22import org .junit .jupiter .api .Test ;
33
44import static org .assertj .core .api .Assertions .assertThat ;
5- import static org .assertj .core .api .Assertions .within ;
5+ import static org .assertj .core .api .Assertions .offset ;
66
77public class SpaceAgeTest {
88
@@ -12,62 +12,62 @@ public class SpaceAgeTest {
1212 public void ageOnEarth () {
1313 SpaceAge age = new SpaceAge (1000000000 );
1414
15- assertThat (age .onEarth ()).isEqualTo (31.69 , within (MAXIMUM_DELTA ));
15+ assertThat (age .onEarth ()).isEqualTo (31.69 , offset (MAXIMUM_DELTA ));
1616 }
1717
1818 @ Disabled ("Remove to run test" )
1919 @ Test
2020 public void ageOnMercury () {
2121 SpaceAge age = new SpaceAge (2134835688 );
2222
23- assertThat (age .onMercury ()).isEqualTo (280.88 , within (MAXIMUM_DELTA ));
23+ assertThat (age .onMercury ()).isEqualTo (280.88 , offset (MAXIMUM_DELTA ));
2424 }
2525
2626 @ Disabled ("Remove to run test" )
2727 @ Test
2828 public void ageOnVenus () {
2929 SpaceAge age = new SpaceAge (189839836 );
3030
31- assertThat (age .onVenus ()).isEqualTo (9.78 , within (MAXIMUM_DELTA ));
31+ assertThat (age .onVenus ()).isEqualTo (9.78 , offset (MAXIMUM_DELTA ));
3232 }
3333
3434 @ Disabled ("Remove to run test" )
3535 @ Test
3636 public void ageOnMars () {
3737 SpaceAge age = new SpaceAge (2129871239L );
3838
39- assertThat (age .onMars ()).isEqualTo (35.88 , within (MAXIMUM_DELTA ));
39+ assertThat (age .onMars ()).isEqualTo (35.88 , offset (MAXIMUM_DELTA ));
4040 }
4141
4242 @ Disabled ("Remove to run test" )
4343 @ Test
4444 public void ageOnJupiter () {
4545 SpaceAge age = new SpaceAge (901876382 );
4646
47- assertThat (age .onJupiter ()).isEqualTo (2.41 , within (MAXIMUM_DELTA ));
47+ assertThat (age .onJupiter ()).isEqualTo (2.41 , offset (MAXIMUM_DELTA ));
4848 }
4949
5050 @ Disabled ("Remove to run test" )
5151 @ Test
5252 public void ageOnSaturn () {
5353 SpaceAge age = new SpaceAge (2000000000L );
5454
55- assertThat (age .onSaturn ()).isEqualTo (2.15 , within (MAXIMUM_DELTA ));
55+ assertThat (age .onSaturn ()).isEqualTo (2.15 , offset (MAXIMUM_DELTA ));
5656 }
5757
5858 @ Disabled ("Remove to run test" )
5959 @ Test
6060 public void ageOnUranus () {
6161 SpaceAge age = new SpaceAge (1210123456L );
6262
63- assertThat (age .onUranus ()).isEqualTo (0.46 , within (MAXIMUM_DELTA ));
63+ assertThat (age .onUranus ()).isEqualTo (0.46 , offset (MAXIMUM_DELTA ));
6464 }
6565
6666 @ Disabled ("Remove to run test" )
6767 @ Test
6868 public void ageOnNeptune () {
6969 SpaceAge age = new SpaceAge (1821023456L );
7070
71- assertThat (age .onNeptune ()).isEqualTo (0.35 , within (MAXIMUM_DELTA ));
71+ assertThat (age .onNeptune ()).isEqualTo (0.35 , offset (MAXIMUM_DELTA ));
7272 }
7373}
0 commit comments