Use local variable type inference (#995)
* "visitor" pattern: Use local variable type inference Update "visitor" pattern with local variable type inference. * "value-object" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference. * "unit-of-work" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference. * "typeobjectpattern" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference.
This commit is contained in:
committed by
Ilkka Seppälä
parent
5fc03ee9f8
commit
c81c3ff1c7
@ -45,8 +45,8 @@ public class HeroStatTest {
|
||||
*/
|
||||
@Test
|
||||
public void testEquals() {
|
||||
HeroStat heroStatA = HeroStat.valueOf(3, 9, 2);
|
||||
HeroStat heroStatB = HeroStat.valueOf(3, 9, 2);
|
||||
var heroStatA = HeroStat.valueOf(3, 9, 2);
|
||||
var heroStatB = HeroStat.valueOf(3, 9, 2);
|
||||
new EqualsTester().addEqualityGroup(heroStatA, heroStatB).testEquals();
|
||||
}
|
||||
|
||||
@ -56,9 +56,9 @@ public class HeroStatTest {
|
||||
*/
|
||||
@Test
|
||||
public void testToString() {
|
||||
HeroStat heroStatA = HeroStat.valueOf(3, 9, 2);
|
||||
HeroStat heroStatB = HeroStat.valueOf(3, 9, 2);
|
||||
HeroStat heroStatC = HeroStat.valueOf(3, 9, 8);
|
||||
var heroStatA = HeroStat.valueOf(3, 9, 2);
|
||||
var heroStatB = HeroStat.valueOf(3, 9, 2);
|
||||
var heroStatC = HeroStat.valueOf(3, 9, 8);
|
||||
|
||||
assertThat(heroStatA.toString(), is(heroStatB.toString()));
|
||||
assertThat(heroStatA.toString(), is(not(heroStatC.toString())));
|
||||
|
Reference in New Issue
Block a user