Skip to content

Commit b4d2e36

Browse files
GHI-#8 Refactor getVersion() unit test to run against arcver-java
1 parent e26e5cf commit b4d2e36

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

nord-java.iml

+1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
1616
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
1717
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
18+
<orderEntry type="library" scope="TEST" name="Maven: com.arcticicestudio:arcver-java:0.11.0-SNAPSHOT" level="project" />
1819
</component>
1920
</module>

pom.xml

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
44
title POM +
55
project nord-java +
6-
version 0.1.0 +
76
repository https://github.com/arcticicestudio/nord-java +
87
author Arctic Ice Studio +
98
@@ -17,7 +16,7 @@ Apache Maven
1716
(https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html)
1817
Sonatype
1918
(http://books.sonatype.com/mvnref-book/reference)
20-
JFrog Bintray
19+
JFrog
2120
(https://bintray.com/docs/usermanual)
2221
-->
2322
<project
@@ -126,6 +125,13 @@ JFrog Bintray
126125
<version>1.3</version>
127126
<scope>test</scope>
128127
</dependency>
128+
129+
<dependency>
130+
<groupId>com.arcticicestudio</groupId>
131+
<artifactId>arcver-java</artifactId>
132+
<version>0.11.0-SNAPSHOT</version>
133+
<scope>test</scope>
134+
</dependency>
129135
</dependencies>
130136

131137
<build>

src/test/java/com/arcticicestudio/nord/NordTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ copyright Copyright (C) 2016 +
1111
*/
1212
package com.arcticicestudio.nord;
1313

14+
import com.arcticicestudio.arcver.Version;
1415
import org.junit.Test;
1516

1617
import static org.junit.Assert.assertEquals;
18+
import static org.junit.Assert.assertTrue;
1719

1820
/**
1921
* Unit tests for the public API {@link Nord}.
@@ -65,6 +67,6 @@ public void shouldReturnTheCorrectRGBColorCode() {
6567

6668
@Test
6769
public void shouldReturnTheCorrectVersionString() {
68-
assertEquals(Nord.NORD0.getVersion(), "0.1.0");
70+
assertTrue(Version.valueOf(Nord.getVersion()).satisfies("0.1.0"));
6971
}
7072
}

0 commit comments

Comments
 (0)