-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(spring-lnurl): add test for SimpleK1FactoryTest
- Loading branch information
1 parent
8c1fdef
commit 6799cee
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...-lnurl/spring-lnurl-auth-simple/src/test/java/org/tbk/lnurl/auth/SimpleK1FactoryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))); | ||
} | ||
} |