Changeset 32637 in osm for applications/editors/josm/plugins/indoorhelper/test/unit
- Timestamp:
- 2016-07-11T22:48:15+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/indoorhelper/test/unit/PresetCounterTest.java
r32122 r32637 1 import static org.junit.Assert. *;1 import static org.junit.Assert.assertEquals; 2 2 3 3 import java.util.ArrayList; … … 11 11 public class PresetCounterTest { 12 12 13 14 15 16 17 18 19 13 /** 14 * Test case for testing the ranking functionality. 15 */ 16 @Test 17 public void testRanking() { 18 // input preparation 19 PresetCounter counter = new PresetCounter(); 20 20 21 22 23 24 25 26 27 21 counter.count(IndoorObject.CONCRETE_WALL); 22 counter.count(IndoorObject.CONCRETE_WALL); 23 counter.count(IndoorObject.CONCRETE_WALL); 24 counter.count(IndoorObject.ROOM); 25 counter.count(IndoorObject.ROOM); 26 counter.count(IndoorObject.STEPS); 27 counter.count(IndoorObject.TOILET_MALE); 28 28 29 29 List<IndoorObject> actualList = counter.getRanking(); 30 30 31 //expectation 32 List<IndoorObject> expectedList = new ArrayList<>(); 33 expectedList.add(IndoorObject.CONCRETE_WALL); 34 expectedList.add(IndoorObject.ROOM); 35 expectedList.add(IndoorObject.TOILET_MALE); 36 expectedList.add(IndoorObject.STEPS); 37 38 39 //assertion 40 assertEquals(expectedList.get(0), actualList.get(0)); 41 assertEquals(expectedList.get(1), actualList.get(1)); 42 assertEquals(expectedList.get(2), actualList.get(2)); 43 assertEquals(expectedList.get(3), actualList.get(3)); 31 //expectation 32 List<IndoorObject> expectedList = new ArrayList<>(); 33 expectedList.add(IndoorObject.CONCRETE_WALL); 34 expectedList.add(IndoorObject.ROOM); 35 expectedList.add(IndoorObject.TOILET_MALE); 36 expectedList.add(IndoorObject.STEPS); 44 37 45 38 46 } 39 //assertion 40 assertEquals(expectedList.get(0), actualList.get(0)); 41 assertEquals(expectedList.get(1), actualList.get(1)); 42 assertEquals(expectedList.get(2), actualList.get(2)); 43 assertEquals(expectedList.get(3), actualList.get(3)); 44 45 46 } 47 47 }
Note:
See TracChangeset
for help on using the changeset viewer.