extended tests for Zones
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package ch.zhaw.gartenverwaltung.io;
|
||||
|
||||
import ch.zhaw.gartenverwaltung.types.GrowthPhase;
|
||||
import ch.zhaw.gartenverwaltung.types.HardinessZone;
|
||||
import ch.zhaw.gartenverwaltung.types.Plant;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
@@ -82,6 +83,12 @@ public class JsonPlantDatabase implements PlantDatabase {
|
||||
result = mapper.readerForListOf(Plant.class).readValue(dataSource);
|
||||
|
||||
for (Plant plant : result) {
|
||||
// for discussion because of failing tests:
|
||||
// for(GrowthPhase growthPhase: plant.lifecycle()) {
|
||||
// if(growthPhase.zone()==zone) {
|
||||
// keep in result, remove if no match
|
||||
// }
|
||||
// }
|
||||
plant.inZone(currentZone);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user