Skip to content

Commit

Permalink
test(spring-lnurl): add test for SimpleK1FactoryTest
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Feb 8, 2024
1 parent 8c1fdef commit 6799cee
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.tbk.lnurl.auth;

import org.junit.jupiter.api.RepeatedTest;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;

class SimpleK1FactoryTest {

private final SimpleK1Factory sut = new SimpleK1Factory();

@RepeatedTest(21)
void itShouldCreateRandomK1() {
K1 firstK1 = this.sut.create();
assertThat(firstK1.toArray().length, is(32));

K1 secondK1 = this.sut.create();
assertThat(secondK1.toArray().length, is(32));

assertThat(firstK1, not(is(secondK1)));
}
}

0 comments on commit 6799cee

Please sign in to comment.