2323
2424package com .iluwatar .memento ;
2525
26- import org .junit .jupiter .api .Test ;
27-
2826import static org .junit .jupiter .api .Assertions .assertEquals ;
2927
28+ import org .junit .jupiter .api .Test ;
29+
3030/**
3131 * Date: 12/20/15 - 10:08 AM
3232 *
@@ -39,7 +39,7 @@ public class StarTest {
3939 */
4040 @ Test
4141 public void testTimePasses () {
42- final Star star = new Star (StarType .SUN , 1 , 2 );
42+ final var star = new Star (StarType .SUN , 1 , 2 );
4343 assertEquals ("sun age: 1 years mass: 2 tons" , star .toString ());
4444
4545 star .timePasses ();
@@ -66,16 +66,16 @@ public void testTimePasses() {
6666 */
6767 @ Test
6868 public void testSetMemento () {
69- final Star star = new Star (StarType .SUN , 1 , 2 );
70- final StarMemento firstMemento = star .getMemento ();
69+ final var star = new Star (StarType .SUN , 1 , 2 );
70+ final var firstMemento = star .getMemento ();
7171 assertEquals ("sun age: 1 years mass: 2 tons" , star .toString ());
7272
7373 star .timePasses ();
74- final StarMemento secondMemento = star .getMemento ();
74+ final var secondMemento = star .getMemento ();
7575 assertEquals ("red giant age: 2 years mass: 16 tons" , star .toString ());
7676
7777 star .timePasses ();
78- final StarMemento thirdMemento = star .getMemento ();
78+ final var thirdMemento = star .getMemento ();
7979 assertEquals ("white dwarf age: 4 years mass: 128 tons" , star .toString ());
8080
8181 star .timePasses ();
0 commit comments