Skip to content

Commit

Permalink
update ver and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsra committed Apr 1, 2024
1 parent f218baf commit 363e1e1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ To deserialize a CodeTF file using these objects, simply deserialize with Jackso

## Gradle
```kotlin
implementation("io.codemodder:codetf-java:3.2.0")
implementation("io.codemodder:codetf-java:3.2.1")
```

## Maven
```xml
<dependency>
<groupId>io.codemodder</groupId>
<artifactId>codetf-java</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.codemodder</groupId>
<artifactId>codetf-java</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>


<name>codetf-java</name>
Expand Down
14 changes: 7 additions & 7 deletions src/test/java/io/codemodder/codetf/CodeTFResultTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.Set;
import org.junit.jupiter.api.Test;

class CodeTFResultTest {
final class CodeTFResultTest {

@Test
void it_creates_result() {
Expand Down Expand Up @@ -88,8 +88,8 @@ void it_creates_detection_tool_with_empty_url() {
"tool",
new DetectorRule("rule", "Here's a rule", null),
List.of(
new DetectorFinding("finding", true, "It's fixed"),
new DetectorFinding("finding", false, null)));
new DetectorFinding("finding", true, null),
new DetectorFinding("finding", false, "It's fixed")));
assertNotNull(tool);
assertEquals("tool", tool.getName());
assertEquals("rule", tool.getRule().getId());
Expand All @@ -106,7 +106,7 @@ void it_creates_detection_tool_with_url() {
new DetectorRule("rule", "Here's a rule", "https://example.com"),
List.of(
new DetectorFinding("finding", true, "It's fixed"),
new DetectorFinding("finding", false, null)));
new DetectorFinding("finding", false, "It's not fixed")));
assertNotNull(tool);
assertEquals("tool", tool.getName());
assertEquals("rule", tool.getRule().getId());
Expand All @@ -127,15 +127,15 @@ void it_creates_finding() {

@Test
void it_raises_iae_on_fixed_finding_with_null_reason() {
assertThrows(IllegalArgumentException.class, () -> new DetectorFinding("finding", true, null));
assertThrows(IllegalArgumentException.class, () -> new DetectorFinding("finding", false, null));
}

@Test
void it_creates_finding_with_null_reason() {
DetectorFinding finding = new DetectorFinding("finding", false, null);
DetectorFinding finding = new DetectorFinding("finding", true, null);
assertNotNull(finding);
assertEquals("finding", finding.getId());
assertFalse(finding.getFixed());
assertTrue(finding.getFixed());
assertTrue(finding.getReason().isEmpty());
}
}

0 comments on commit 363e1e1

Please sign in to comment.