コード例 #1
0
 @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");
 }
コード例 #2
0
 @Override
 public void checksumsDoesNotMatch() {
   boolean ok = policy.verifyChecksum(notMatchedChecksums);
   Assert.assertFalse(ok, "Policy should fail if checksums don't match");
 }
コード例 #3
0
 @Override
 public void noOriginalChecksum() {
   boolean ok = policy.verifyChecksum(noOriginalChecksum);
   Assert.assertTrue(ok, "Policy should ignore missing original checksums");
 }
コード例 #4
0
 @Override
 public void checksumsMatch() {
   boolean ok = policy.verifyChecksum(matchedChecksums);
   Assert.assertTrue(ok, "Policy should pass if checksums are same");
 }