Skip to content

Commit

Permalink
- oops fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yossi Farjoun committed Oct 17, 2018
1 parent 232addf commit 3eeec7d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/test/java/picard/fingerprint/CheckFingerprintTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,36 +198,36 @@ public void setup() throws IOException {
@DataProvider(name = "samsToFingerprint")
Object[][] samsToFingerprint() {
return new Object[][]{
{NA12891_r1_sam, na12891_fp},
{NA12892_r1_sam, na12891_fp},
{NA12891_r1_sam, na12891_fp, 0},
{NA12892_r1_sam, na12891_fp, 1},
};
}

@DataProvider(name = "vcfsToFingerprint")
Object[][] vcfsToFingerprint() {
return new Object[][]{
{NA12891_named_NA12892_vcf, na12892_fp},
{NA12892_1_vcf, na12892_fp},
{NA12891_named_NA12892_vcf, na12892_fp, 0},
{NA12892_1_vcf, na12892_fp, 0},
};
}

@Test(dataProvider = "samsToFingerprint")
void testCheckFingerprintSam(File file, File genotypes) throws IOException {
tester(false, file, genotypes);
void testCheckFingerprintSam(final File file, final File genotypes, final int expectedRetVal) throws IOException {
tester(false, file, genotypes, expectedRetVal);

}

@Test(dataProvider = "vcfsToFingerprint")
void testCheckFingerprintVcf(File file, File genotypes) throws IOException {
tester(false, file, genotypes);
void testCheckFingerprintVcf(final File file, final File genotypes, final int expectedRetVal) throws IOException {
tester(false, file, genotypes, expectedRetVal);
}

@Test(dataProvider = "samsToFingerprint")
void testCheckFingerprintNoRg(File file, File genotypes) throws IOException {
tester(true, file, genotypes);
void testCheckFingerprintNoRg(final File file, final File genotypes, final int expectedRetVal) throws IOException {
tester(true, file, genotypes, expectedRetVal);
}

private File tester(boolean ignoreRG, File file, File genotypes) throws IOException {
private File tester(boolean ignoreRG, final File file, final File genotypes, final int expectedRetVal) throws IOException {
final List<String> args = new ArrayList<>();
final File outputSummary = File.createTempFile("fingerprint", "summary_metrics");
outputSummary.deleteOnExit();
Expand All @@ -241,7 +241,7 @@ private File tester(boolean ignoreRG, File file, File genotypes) throws IOExcept
args.add("SUMMARY_OUTPUT=" + outputSummary.getAbsolutePath());
args.add("DETAIL_OUTPUT=" + outputDetail.getAbsolutePath());

Assert.assertEquals(runPicardCommandLine(args), 0);
Assert.assertEquals(runPicardCommandLine(args), expectedRetVal);

Assert.assertTrue(outputSummary.exists(), "Expected output file " + outputSummary.getAbsolutePath() + " to exist.");
Assert.assertTrue(outputDetail.exists(), "Expected output file " + outputDetail.getAbsolutePath() + " to exist.");
Expand Down

0 comments on commit 3eeec7d

Please sign in to comment.