-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase Unit test code coverage (#496)
- Loading branch information
1 parent
d1ee03e
commit 6fa7b4d
Showing
42 changed files
with
1,335 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/test/java/edu/hawaii/its/api/exception/InvalidGroupPathExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package edu.hawaii.its.api.exception; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class InvalidGroupPathExceptionTest { | ||
|
||
@Test | ||
public void construction() { | ||
InvalidGroupPathException exception = new InvalidGroupPathException("fail"); | ||
assertNotNull(exception); | ||
assertEquals("404 NOT_FOUND \"fail\"", exception.getMessage()); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/test/java/edu/hawaii/its/api/exception/JavaVersionExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package edu.hawaii.its.api.exception; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class JavaVersionExceptionTest { | ||
|
||
@Test | ||
public void construction() { | ||
JavaVersionException exception = new JavaVersionException("fail"); | ||
assertNotNull(exception); | ||
assertEquals("fail", exception.getMessage()); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/test/java/edu/hawaii/its/api/exception/JavaVersionFailureAnalyzerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package edu.hawaii.its.api.exception; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class JavaVersionFailureAnalyzerTest { | ||
|
||
@Test | ||
public void analyze() { | ||
JavaVersionFailureAnalyzer javaVersionFailureAnalyzer = new JavaVersionFailureAnalyzer(); | ||
Throwable throwable = new Throwable(); | ||
JavaVersionException exception = new JavaVersionException(""); | ||
assertNotNull(javaVersionFailureAnalyzer.analyze(throwable, exception)); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/test/java/edu/hawaii/its/api/exception/PasswordFoundAnalyzerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package edu.hawaii.its.api.exception; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class PasswordFoundAnalyzerTest { | ||
|
||
@Test | ||
public void analyze() { | ||
PasswordFoundAnalyzer passwordFoundAnalyzer = new PasswordFoundAnalyzer(); | ||
Throwable throwable = new Throwable(); | ||
PasswordFoundException exception = new PasswordFoundException(""); | ||
assertNotNull(passwordFoundAnalyzer.analyze(throwable, exception)); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/test/java/edu/hawaii/its/api/exception/PasswordFoundExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package edu.hawaii.its.api.exception; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class PasswordFoundExceptionTest { | ||
|
||
@Test | ||
public void construction() { | ||
PasswordFoundException exception = new PasswordFoundException("location"); | ||
assertNotNull(exception); | ||
assertEquals("location", exception.getMessage()); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/test/java/edu/hawaii/its/api/exception/PatternFoundExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package edu.hawaii.its.api.exception; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class PatternFoundExceptionTest { | ||
|
||
@Test | ||
public void construction() { | ||
PatternFoundException exception = new PatternFoundException("fail"); | ||
assertNotNull(exception); | ||
assertEquals("fail", exception.getMessage()); | ||
} | ||
|
||
} |
10 changes: 5 additions & 5 deletions
10
src/test/java/edu/hawaii/its/api/exception/UhMemberNotFoundExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
package edu.hawaii.its.api.exception; | ||
|
||
import static org.hamcrest.CoreMatchers.equalTo; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class UhMemberNotFoundExceptionTest { | ||
|
||
@Test | ||
public void construction() { | ||
UhMemberNotFoundException ex = new UhMemberNotFoundException("fail"); | ||
assertNotNull(ex); | ||
assertThat(ex.getMessage(), equalTo("404 NOT_FOUND \"fail\"")); | ||
UhMemberNotFoundException exception = new UhMemberNotFoundException("fail"); | ||
assertNotNull(exception); | ||
assertEquals("404 NOT_FOUND \"fail\"", exception.getMessage()); | ||
} | ||
|
||
} |
Oops, something went wrong.