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 @Test
10 public void dottedVersionIsCorrectlyDescribed() {
11 assertThat(new ApiVersion("1.2.3").toString(), is("1.2.3"));
12 }
13
14 @Test
15 public void integerVersionIsCorrectlyDescribed() {
16 assertThat(new ApiVersion("1").toString(), is("1"));
17 }
18
19 @Test
20 public void noneVersionIsCorrectlyDescribed() {
21 assertThat(new ApiVersion(ApiVersion.NONE_STRING).toString(), is(ApiVersion.NONE_STRING));
22 }
23 }