@@ -22,8 +22,8 @@ void idEquality() {
2222 var uuidStr = uuid .toString ();
2323
2424 // When
25- var id1 = Id .of (uuid );
26- var id2 = Id .of (uuidStr );
25+ var id1 = Ids .of (uuid );
26+ var id2 = Ids .of (uuidStr );
2727
2828 // Then
2929 Assertions .assertThat (id1 ).isEqualTo (id2 ).hasToString (uuidStr );
@@ -32,31 +32,31 @@ void idEquality() {
3232
3333 @ Test
3434 void happyPath () {
35- var id = Id .of (UuidCreator .getTimeOrderedEpoch ());
35+ var id = Ids .of (UuidCreator .getTimeOrderedEpoch ());
3636 Assertions .assertThat (id .value ()).isNotEmpty ();
3737 }
3838
3939 @ Test
4040 void validation () {
4141 String str = null ;
4242 //noinspection ConstantValue
43- Assertions .assertThatNullPointerException ().isThrownBy (() -> Id .of (str ));
44- Assertions .assertThatIllegalArgumentException ().isThrownBy (() -> Id .of (-1L ));
45- Assertions .assertThatIllegalArgumentException ().isThrownBy (() -> Id .of ("" ));
43+ Assertions .assertThatNullPointerException ().isThrownBy (() -> Ids .of (str ));
44+ Assertions .assertThatIllegalArgumentException ().isThrownBy (() -> Ids .of (-1L ));
45+ Assertions .assertThatIllegalArgumentException ().isThrownBy (() -> Ids .of ("" ));
4646 }
4747
4848 @ Test
4949 void uuidOrdering () {
5050 TreeMap <Id , Integer > map = new TreeMap <>();
51- IntStream .range (0 , 1000 ).forEach (i -> map .put (Id .of (UuidCreator .getTimeOrderedEpoch ()), i ));
51+ IntStream .range (0 , 1000 ).forEach (i -> map .put (Ids .of (UuidCreator .getTimeOrderedEpoch ()), i ));
5252 var atomic = new AtomicInteger (0 );
5353 map .forEach ((k , v ) -> Assertions .assertThat (v ).isEqualTo (atomic .getAndIncrement ()));
5454 }
5555
5656 @ Test
5757 void seqIdOrdering () {
5858 TreeMap <Id , Integer > map = new TreeMap <>();
59- IntStream .range (0 , 1000 ).forEach (i -> map .put (Id .of (i ), i ));
59+ IntStream .range (0 , 1000 ).forEach (i -> map .put (Ids .of (i ), i ));
6060 var atomic = new AtomicInteger (0 );
6161 map .forEach ((k , v ) -> Assertions .assertThat (v ).isEqualTo (atomic .getAndIncrement ()));
6262 }
0 commit comments