|
|
hace 8 años | |
|---|---|---|
| src | hace 8 años | |
| .gitignore | hace 8 años | |
| .travis.yml | hace 8 años | |
| README-TDDPatterns.md | hace 8 años | |
| README.md | hace 8 años | |
| pom.xml | hace 8 años |
test.java.rocks.zipcodewilmington package and completing each of the TODOs.void setName(String name)
.setName is invoked on an instance of Cat, the name field is being set to the respective value.String speak()
.speak is invoked on an instance of Cat, the value "meow!" is returned.setBirthDate(Date birthDate)
.setBirthDate is invoked on an instance of Cat, the name field is being set to the respective value.void eat(Food food)
.eat is invoked on an instance of Cat, the numberOfMealsEaten is increased by 1.Integer getId()
.getId is invoked on an instance of Cat, the respective id value is returned.java instanceof keyword
Cat is an instanceof an Animaljava instanceof keyword
Cat is an instanceof a Mammalvoid setName(String name)
.setName is invoked on an instance of Dog, the name field is being set to the respective value.String speak()
.speak is invoked on an instance of Dog, the value "bark!" is returned.setBirthDate(Date birthDate)
.setBirthDate is invoked on an instance of Dog, the name field is being set to the respective value.void eat(Food food)
.eat is invoked on an instance of Dog, the numberOfMealsEaten is increased by 1.Integer getId()
.getId is invoked on an instance of Dog, the respective id value is returned.java instanceof keyword
Dog is an instanceof an Animaljava instanceof keyword
Dog is an instanceof an MammalAnimal createDog(String name, Date birthDate)
.createDog is invoked on AnimalFactoryTest a Dog is created with the respective name and birthDate value.Animal createCat(String name, Date birthDate)
.createCat is invoked on AnimalFactoryTest a Dog is created with the respective name and birthDate value.void add(Cat cat)
.add is invoked on the CatHouse, a respective Cat object can be retrieved from the house.void remove(Cat cat)
.remove is invoked on the CatHouse, a respective Cat object can no longer be retrieved from the house.void remove(Integer id)
.remove is invoked on the CatHouse, a Cat object with the respective id can no longer be retrieved from the house.Cat getCatById(Integer id)
.getCatById is invoked on the CatHouse, a Cat with the respective id is returned.Integer getNumberOfCats()
.getNumberOfCats() is invoked on the CatHouse, the respective number of Cat objects is returned.void add(Dog dog)
.add is invoked on the DogHouse, a respective Dog object can be retrieved from the house.void remove(Integer id)
.remove is invoked on the DogHouse, a respective Dog object can no longer be retrieved from the house.void remove(Dog dog)
.remove is invoked on the DogHouse, a Dog object with the respective id can no longer be retrieved from the house.Dog getDogById(Integer id)
.getCatById is invoked on the DogHouse, a Dog with the respective id is returned.Integer getNumberOfDogs()
.getNumberOfDogs() is invoked on the DogHouse, the respective number of Dog objects is returned.