Skip to content

Commit c2517d3

Browse files
author
James Heggs
committed
Add further tests for height and setting
1 parent e748edb commit c2517d3

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/test/java/com/techreturners/cats/CatTest.java

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package com.techreturners.cats;
22

3-
import static org.junit.Assert.assertFalse;
4-
import static org.junit.Assert.assertTrue;
5-
63
import org.junit.Test;
74

5+
import static org.junit.Assert.*;
6+
87
public class CatTest {
98

109
@Test
@@ -28,5 +27,22 @@ public void checkCatCanWakep() {
2827
assertFalse("Cat should be awake now", domesticCat.isAsleep());
2928
}
3029

30+
@Test
31+
public void checkCatSetting() {
32+
Cat domesticCat = new DomesticCat();
33+
assertEquals("domestic", domesticCat.getSetting());
34+
}
35+
36+
@Test
37+
public void checkCatHeight() {
38+
Cat domesticCat = new DomesticCat();
39+
assertEquals(23, domesticCat.getAverageHeight());
40+
}
41+
42+
@Test
43+
public void checkLionHeight() {
44+
Cat domesticCat = new LionCat();
45+
assertEquals(1100, domesticCat.getAverageHeight());
46+
}
3147

3248
}

0 commit comments

Comments
 (0)