24
24
*/
25
25
package com .iluwatar .value .object ;
26
26
27
- import static org .hamcrest .CoreMatchers .is ;
28
- import static org .hamcrest .CoreMatchers .not ;
29
- import static org .junit .Assert .assertThat ;
27
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
28
+ import static org .junit .jupiter .api .Assertions .assertNotEquals ;
30
29
31
- import com .google .common .testing .EqualsTester ;
32
30
import org .junit .jupiter .api .Test ;
33
31
34
32
/**
@@ -47,7 +45,7 @@ class HeroStatTest {
47
45
void testEquals () {
48
46
var heroStatA = HeroStat .valueOf (3 , 9 , 2 );
49
47
var heroStatB = HeroStat .valueOf (3 , 9 , 2 );
50
- new EqualsTester (). addEqualityGroup ( heroStatA , heroStatB ). testEquals ( );
48
+ assertEquals ( heroStatA , heroStatB );
51
49
}
52
50
53
51
/**
@@ -59,9 +57,8 @@ void testToString() {
59
57
var heroStatA = HeroStat .valueOf (3 , 9 , 2 );
60
58
var heroStatB = HeroStat .valueOf (3 , 9 , 2 );
61
59
var heroStatC = HeroStat .valueOf (3 , 9 , 8 );
62
-
63
- assertThat (heroStatA .toString (), is (heroStatB .toString ()));
64
- assertThat (heroStatA .toString (), is (not (heroStatC .toString ())));
60
+ assertEquals (heroStatA .toString (), heroStatB .toString ());
61
+ assertNotEquals (heroStatA .toString (), heroStatC .toString ());
65
62
}
66
63
67
64
}
0 commit comments