|
15 | 15 | * Begin by opening the `test.java.rocks.zipcodewilmington` package and completing each of the `TODO`s.
|
16 | 16 |
|
17 | 17 | ### CatTest
|
18 |
| -* Create tests for `void setName(String name)` |
| 18 | +#### `void setName(String name)` |
19 | 19 | * ensure that when `.setName` is invoked on an instance of `Cat`, the `name` field is being set to the respective value.
|
20 |
| -* Create tests for `String speak()` |
| 20 | +#### `String speak()` |
21 | 21 | * ensure that when `.speak` is invoked on an instance of `Cat`, the value `"meow!"` is returned.
|
22 |
| -* Create tests for `setBirthDate(Date birthDate)` |
| 22 | +#### `setBirthDate(Date birthDate)` |
23 | 23 | * ensure that when `.setBirthDate` is invoked on an instance of `Cat`, the `name` field is being set to the respective value.
|
24 |
| -* Create tests for `void eat(Food food)` |
| 24 | +#### `void eat(Food food)` |
25 | 25 | * ensure that when `.eat` is invoked on an instance of `Cat`, the `numberOfMealsEaten` is increased by 1.
|
26 |
| -* Create tests for `Integer getId()` |
| 26 | +#### `Integer getId()` |
27 | 27 | * ensure that when `.getId` is invoked on an instance of `Cat`, the respective `id` value is returned.
|
28 | 28 | * Create test to check Animal inheritance; google search `java instanceof keyword`
|
29 | 29 | * ensure that a `Cat` is an `instanceof` an Animal
|
30 | 30 | * Create test to check Mammal inheritance; google search `java instanceof keyword`
|
31 | 31 | * ensure that a `Cat` is an `instanceof` a Mammal
|
32 | 32 |
|
33 | 33 | ### DogTest
|
34 |
| -* Create tests for `void setName(String name)` |
| 34 | +#### `void setName(String name)` |
35 | 35 | * ensure that when `.setName` is invoked on an instance of `Dog`, the `name` field is being set to the respective value.
|
36 |
| -* Create tests for `String speak()` |
| 36 | +#### `String speak()` |
37 | 37 | * ensure that when `.speak` is invoked on an instance of `Dog`, the value `"bark!"` is returned.
|
38 |
| -* Create tests for `setBirthDate(Date birthDate)` |
| 38 | +#### `setBirthDate(Date birthDate)` |
39 | 39 | * ensure that when `.setBirthDate` is invoked on an instance of `Dog`, the `name` field is being set to the respective value.
|
40 |
| -* Create tests for `void eat(Food food)` |
| 40 | +#### `void eat(Food food)` |
41 | 41 | * ensure that when `.eat` is invoked on an instance of `Dog`, the `numberOfMealsEaten` is increased by 1.
|
42 |
| -* Create tests for `Integer getId()` |
| 42 | +#### `Integer getId()` |
43 | 43 | * ensure that when `.getId` is invoked on an instance of `Dog`, the respective `id` value is returned.
|
44 | 44 | * Create test to check Animal inheritance; google search `java instanceof keyword`
|
45 | 45 | * ensure that a `Dog` is an `instanceof` an Animal
|
|
54 | 54 | * ensure that when `.createCat` is invoked on `AnimalFactoryTest` a `Dog` is created with the respective `name` and `birthDate` value.
|
55 | 55 |
|
56 | 56 | ### CatHouseTest
|
57 |
| -* Create tests for `void add(Cat cat)` |
58 |
| - * ensure that when `.add` is invoked on the `CatHouse`, a respective `Cat` object can be retrieved from the house. |
59 |
| -* Create tests for `void remove(Cat cat)` |
60 |
| - * ensure that when `.remove` is invoked on the `CatHouse`, a respective `Cat` object can no longer be retrieved from the house. |
61 |
| -* Create tests for `void remove(Integer id)` |
62 |
| - * ensure that when `.remove` is invoked on the `CatHouse`, a `Cat` object with the respective `id` can no longer be retrieved from the house. |
63 |
| -* Create tests for `Cat getCatById(Integer id)` |
64 |
| - * ensure that when `.getCatById` is invoked on the `CatHouse`, a `Cat` with the respective `id` is returned. |
65 |
| -* Create tests for `Integer getNumberOfCats()` |
66 |
| - * ensure that when `.getNumberOfCats()` is invoked on the `CatHouse`, the respective number of `Cat` objects is returned. |
67 |
| - |
| 57 | +#### `void add(Cat cat)` |
| 58 | +* ensure that when `.add` is invoked on the `CatHouse`, a respective `Cat` object can be retrieved from the house. |
| 59 | +#### `void remove(Cat cat)` |
| 60 | +* ensure that when `.remove` is invoked on the `CatHouse`, a respective `Cat` object can no longer be retrieved from the house. |
| 61 | +#### `void remove(Integer id)` |
| 62 | +* ensure that when `.remove` is invoked on the `CatHouse`, a `Cat` object with the respective `id` can no longer be retrieved from the house. |
| 63 | +#### `Cat getCatById(Integer id)` |
| 64 | +* ensure that when `.getCatById` is invoked on the `CatHouse`, a `Cat` with the respective `id` is returned. |
| 65 | +#### `Integer getNumberOfCats()` |
| 66 | +* ensure that when `.getNumberOfCats()` is invoked on the `CatHouse`, the respective number of `Cat` objects is returned. |
| 67 | + |
68 | 68 | ### DogHouseTest
|
69 |
| -* Create tests for `void add(Dog dog)` |
70 |
| - * ensure that when `.add` is invoked on the `DogHouse`, a respective `Dog` object can be retrieved from the house. |
71 |
| -* Create tests for `void remove(Integer id)` |
72 |
| - * ensure that when `.remove` is invoked on the `DogHouse`, a respective `Dog` object can no longer be retrieved from the house. |
73 |
| -* Create tests for `void remove(Dog dog)` |
74 |
| - * ensure that when `.remove` is invoked on the `DogHouse`, a `Dog` object with the respective `id` can no longer be retrieved from the house. |
75 |
| -* Create tests for `Dog getDogById(Integer id)` |
76 |
| - * ensure that when `.getCatById` is invoked on the `DogHouse`, a `Dog` with the respective `id` is returned. |
77 |
| -* Create tests for `Integer getNumberOfCats()` |
78 |
| - * ensure that when `.getNumberOfCats()` is invoked on the `DogHouse`, the respective number of `Dog` objects is returned. |
| 69 | +#### `void add(Dog dog)` |
| 70 | +* ensure that when `.add` is invoked on the `DogHouse`, a respective `Dog` object can be retrieved from the house. |
| 71 | +#### `void remove(Integer id)` |
| 72 | +* ensure that when `.remove` is invoked on the `DogHouse`, a respective `Dog` object can no longer be retrieved from the house. |
| 73 | +#### `void remove(Dog dog)` |
| 74 | +* ensure that when `.remove` is invoked on the `DogHouse`, a `Dog` object with the respective `id` can no longer be retrieved from the house. |
| 75 | +#### `Dog getDogById(Integer id)` |
| 76 | +* ensure that when `.getCatById` is invoked on the `DogHouse`, a `Dog` with the respective `id` is returned. |
| 77 | +#### `Integer getNumberOfCats()` |
| 78 | +* ensure that when `.getNumberOfCats()` is invoked on the `DogHouse`, the respective number of `Dog` objects is returned. |
79 | 79 |
|
0 commit comments