-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix precision of max-diff value in url config. See #82
- Loading branch information
1 parent
e35c236
commit e841c80
Showing
5 changed files
with
53 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package de.otto.jlineup; | ||
|
||
import de.otto.jlineup.config.JobConfig; | ||
import de.otto.jlineup.config.UrlConfig; | ||
import de.otto.jlineup.report.Summary; | ||
import de.otto.jlineup.report.UrlReport; | ||
import org.assertj.core.data.MapEntry; | ||
import org.junit.Test; | ||
|
||
import java.util.Collections; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
public class JLineupRunnerTest { | ||
|
||
@Test | ||
public void shouldNotFailIfMaxDiffIsSameAsDetectedDiff() { | ||
|
||
UrlReport urlReport = new UrlReport(null, new Summary(false, 0, 15.1234567890123456, 0)); | ||
boolean detectedDifferenceGreaterThanMaxDifference = JLineupRunner.isDetectedDifferenceGreaterThanMaxDifference(Collections.singleton(MapEntry.entry("abc", urlReport)), JobConfig.exampleConfigBuilder().withUrls(Collections.singletonMap("abc", UrlConfig.urlConfigBuilder().withMaxDiff(15.1234567890123456).build())).build()); | ||
|
||
assertThat(detectedDifferenceGreaterThanMaxDifference, is(false)); | ||
} | ||
|
||
} |
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