View Javadoc

1   package com.atlassian.plugins.rest.module;
2   
3   import org.junit.Test;
4   
5   import static org.hamcrest.MatcherAssert.assertThat;
6   import static org.hamcrest.Matchers.is;
7   
8   public class ApiVersionToStringTest
9   {
10      @Test
11      public void dottedVersionIsCorrectlyDescribed()
12      {
13          assertThat(new ApiVersion("1.2.3").toString(), is("1.2.3"));
14      }
15  
16      @Test
17      public void integerVersionIsCorrectlyDescribed()
18      {
19          assertThat(new ApiVersion("1").toString(), is("1"));
20      }
21  
22      @Test
23      public void noneVersionIsCorrectlyDescribed()
24      {
25          assertThat(new ApiVersion(ApiVersion.NONE_STRING).toString(), is(ApiVersion.NONE_STRING));
26      }
27  }