Skip to content

Commit

Permalink
Merge pull request #4 from vaccovecrana/fix/test-fixes
Browse files Browse the repository at this point in the history
Fixing one test case
  • Loading branch information
zhaoyuango authored Mar 8, 2024
2 parents fb0bcf4 + 326b6ea commit 15eb1ad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/test/java/io/vacco/oruzka/OzHashSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@
import java.util.stream.IntStream;

import static j8spec.J8Spec.*;
import static org.junit.Assert.*;

@RunWith(J8SpecRunner.class)
public class OzHashSpec {
static {
describe("Hashing", () -> {
it("can hash an array of strings", () -> {
OzArrays.toStringConcat("Hello", "World")
.ifPresent(bytes -> System.out.println(OzMd5.md5SumOf(bytes)));
Object[] strings = new Object[] {"Hello", "World"};
OzArrays.toStringConcat(strings)
.ifPresent(bytes -> {
String md5Hash = OzMd5.md5SumOf(bytes);
assertEquals("68E109F0F40CA72A15E05CC22786F8E6", md5Hash);
});
});
it("can compute the MD5 sum of a file", () -> {
System.out.println(OzMd5.md5SumOf(new File("./build.gradle.kts")));
Expand Down

0 comments on commit 15eb1ad

Please sign in to comment.