9293949596979899
assertEquals(0.0, c.getCoveredRatio(), 0.0); } @Test public void testGetCoveredRatio3() { ICounter c = CounterImpl.getInstance(0, 0); assertTrue(Double.isNaN(c.getCoveredRatio())); }
9899100101102103104105
assertTrue(Double.isNaN(c.getCoveredRatio())); } @Test public void testGetMissedRatio1() { ICounter c = CounterImpl.getInstance(10, 30); assertEquals(0.25, c.getMissedRatio(), 0.0); }
104105106107108109110111
assertEquals(0.25, c.getMissedRatio(), 0.0); } @Test public void testGetMissedRatio2() { ICounter c = CounterImpl.getInstance(0, 20); assertEquals(0.0, c.getMissedRatio(), 0.0); }
110111112113114115116117
assertEquals(0.0, c.getMissedRatio(), 0.0); } @Test public void testGetMissedRatio3() { ICounter c = CounterImpl.getInstance(0, 0); assertTrue(Double.isNaN(c.getMissedRatio())); }
116117118119120121122123
assertTrue(Double.isNaN(c.getMissedRatio())); } @Test public void testGetMissedStatus1() { ICounter c = CounterImpl.getInstance(0, 0); assertEquals(ICounter.EMPTY, c.getStatus()); }
122123124125126127128129
assertEquals(ICounter.EMPTY, c.getStatus()); } @Test public void testGetMissedStatus2() { ICounter c = CounterImpl.getInstance(5, 0); assertEquals(ICounter.NOT_COVERED, c.getStatus()); }
128129130131132133134135
assertEquals(ICounter.NOT_COVERED, c.getStatus()); } @Test public void testGetMissedStatus3() { ICounter c = CounterImpl.getInstance(0, 5); assertEquals(ICounter.FULLY_COVERED, c.getStatus()); }
134135136137138139140141
assertEquals(ICounter.FULLY_COVERED, c.getStatus()); } @Test public void testGetMissedStatus4() { ICounter c = CounterImpl.getInstance(2, 3); assertEquals(ICounter.PARTLY_COVERED, c.getStatus()); }
140141142143144145146147148
assertEquals(ICounter.PARTLY_COVERED, c.getStatus()); } @Test public void testEquals1() { ICounter c1 = CounterImpl.getInstance(300, 123); ICounter c2 = CounterImpl.getInstance(300, 123); assertEquals(c1, c2); }
147148149150151152153154155
assertEquals(c1, c2); } @Test public void testEquals2() { ICounter c1 = CounterImpl.getInstance(300, 123); ICounter c2 = CounterImpl.getInstance(400, 123); assertFalse(c1.equals(c2)); }