File tree Expand file tree Collapse file tree
immutables/src/test/java/com/baeldung/immutable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,19 +9,19 @@ public class ImmutablePersonTest {
99
1010 @ Test
1111 public void whenModifying_shouldCreateNewInstance () throws Exception {
12- final com . baeldung . immutable . ImmutablePerson john = com . baeldung . immutable . ImmutablePerson .builder ()
12+ final ImmutablePerson john = ImmutablePerson .builder ()
1313 .age (42 )
1414 .name ("John" )
1515 .build ();
1616
17- final com . baeldung . immutable . ImmutablePerson john43 = john .withAge (43 );
17+ final ImmutablePerson john43 = john .withAge (43 );
1818
1919 assertThat (john )
2020 .isNotSameAs (john43 );
2121
2222 assertThat (john .getAge ())
2323 .isEqualTo (42 );
2424
25- assertImmutable (com . baeldung . immutable . ImmutablePerson .class );
25+ assertImmutable (ImmutablePerson .class );
2626 }
2727}
Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ public class ImmutablePersonAuxiliaryTest {
88
99 @ Test
1010 public void whenComparing_shouldIgnore () throws Exception {
11- final com . baeldung . immutable . auxiliary . ImmutablePerson john1 = com . baeldung . immutable . auxiliary . ImmutablePerson .builder ()
11+ final ImmutablePerson john1 = ImmutablePerson .builder ()
1212 .name ("John" )
1313 .age (42 )
1414 .auxiliaryField ("Value1" )
1515 .build ();
1616
17- final com . baeldung . immutable . auxiliary . ImmutablePerson john2 = com . baeldung . immutable . auxiliary . ImmutablePerson .builder ()
17+ final ImmutablePerson john2 = ImmutablePerson .builder ()
1818 .name ("John" )
1919 .age (42 )
2020 .auxiliaryField ("Value2" )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public class ImmutablePersonDefaultTest {
99 @ Test
1010 public void whenInstantiating_shouldUseDefaultValue () throws Exception {
1111
12- final com . baeldung . immutable . default_ . ImmutablePerson john = com . baeldung . immutable . default_ . ImmutablePerson .builder ().name ("John" ).build ();
12+ final ImmutablePerson john = ImmutablePerson .builder ().name ("John" ).build ();
1313
1414 assertThat (john .getAge ()).isEqualTo (42 );
1515
You can’t perform that action at this time.
0 commit comments