Minor refactorings and code style changes. 1) Removed several use of raw types 2) Removed unnecessary throws clauses 3) Used lambda expressions wherever applicable 4) Used apt assertion methods for readability 5) Use of try with resources wherever applicable 6) Corrected incorrect order of assertXXX arguments
This commit is contained in:
@@ -24,7 +24,9 @@ package com.iluwatar.tolerantreader;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* Date: 12/30/15 - 18:35 PM
|
||||
@@ -43,9 +45,9 @@ public class RainbowFishV2Test {
|
||||
assertEquals(1, fish.getAge());
|
||||
assertEquals(2, fish.getLengthMeters());
|
||||
assertEquals(3, fish.getWeightTons());
|
||||
assertEquals(false, fish.getSleeping());
|
||||
assertEquals(true, fish.getHungry());
|
||||
assertEquals(false, fish.getAngry());
|
||||
assertFalse(fish.getSleeping());
|
||||
assertTrue(fish.getHungry());
|
||||
assertFalse(fish.getAngry());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user