@Override public void returnedChecksum() { String checksum = policy.getChecksum(matchedChecksums); Assert.assertEquals( checksum, matchedChecksums.getActual(), "Should always return the actual value"); checksum = policy.getChecksum(notMatchedChecksums); Assert.assertEquals( checksum, notMatchedChecksums.getActual(), "Should always return the actual value"); checksum = policy.getChecksum(noOriginalChecksum); Assert.assertEquals( checksum, noOriginalChecksum.getActual(), "Should always return the actual value"); }
@Override public void checksumsDoesNotMatch() { boolean ok = policy.verifyChecksum(notMatchedChecksums); Assert.assertFalse(ok, "Policy should fail if checksums don't match"); }
@Override public void noOriginalChecksum() { boolean ok = policy.verifyChecksum(noOriginalChecksum); Assert.assertTrue(ok, "Policy should ignore missing original checksums"); }
@Override public void checksumsMatch() { boolean ok = policy.verifyChecksum(matchedChecksums); Assert.assertTrue(ok, "Policy should pass if checksums are same"); }