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)); }
154155156157158159160161162
assertFalse(c1.equals(c2)); } @Test public void testEquals3() { ICounter c1 = CounterImpl.getInstance(300, 123); ICounter c2 = CounterImpl.getInstance(300, 124); assertFalse(c1.equals(c2)); }
161162163164165166167168
assertFalse(c1.equals(c2)); } @Test public void testEquals4() { ICounter c = CounterImpl.getInstance(300, 123); assertFalse(c.equals(new Integer(123))); }
167168169170171172173174175
assertFalse(c.equals(new Integer(123))); } @Test public void testHashCode1() { ICounter c1 = CounterImpl.getInstance(300, 123); ICounter c2 = CounterImpl.getInstance(300, 123); assertEquals(c1.hashCode(), c2.hashCode()); }
174175176177178179180181182
assertEquals(c1.hashCode(), c2.hashCode()); } @Test public void testHashCode2() { ICounter c1 = CounterImpl.getInstance(300, 123); ICounter c2 = CounterImpl.getInstance(400, 123); assertFalse(c1.hashCode() == c2.hashCode()); }
181182183184185186187188189
assertFalse(c1.hashCode() == c2.hashCode()); } @Test public void testHashCode3() { ICounter c1 = CounterImpl.getInstance(300, 123); ICounter c2 = CounterImpl.getInstance(300, 124); assertFalse(c1.hashCode() == c2.hashCode()); }