File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
src/test/scala/com/comcast/xfinity/sirius/uberstore/common Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,9 @@ class Fnv1aChecksummerTest extends NiceTest {
32
32
val referenceBytes = " http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash" .getBytes
33
33
assert(- 2758076559093427003L === underTest.checksum(referenceBytes))
34
34
}
35
+
36
+ it (" validates the checksum" ) {
37
+ val referenceBytes = " http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash" .getBytes
38
+ assert(true === underTest.validate(referenceBytes, - 2758076559093427003L ))
39
+ }
35
40
}
Original file line number Diff line number Diff line change
1
+ package com .comcast .xfinity .sirius .uberstore .common
2
+
3
+ import com .comcast .xfinity .sirius .NiceTest
4
+
5
+ class SkipValidationChecksummerTest extends NiceTest {
6
+ val underTest = new Object with Fnv1aChecksummer with SkipValidationChecksummer
7
+
8
+ it (" must match the reference impl" ) {
9
+ // from:
10
+ // http://trac.tools.ietf.org/wg/tls/draft-ietf-tls-cached-info/draft-ietf-tls-cached-info-06-from-05.diff.txt
11
+ val referenceBytes = " http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash" .getBytes
12
+ assert(- 2758076559093427003L === underTest.checksum(referenceBytes))
13
+ }
14
+
15
+ it (" skips validating the checksum" ) {
16
+ val referenceBytes = " http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash" .getBytes
17
+ assert(true === underTest.validate(referenceBytes, 0L ))
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments