public void PlantDies() { ISoil soil = new Soil(); IPlant plant = new IdentifiedSeed("Carrot", PlantType.Vegetable); plant.Plant(soil); plant = plant.Grow(); // Seedling plant = plant.Grow(); // Vegetative plant = plant.Grow(); // Flowering plant = plant.Grow(); // Harvestable plant = plant.Grow(); // Dead Assert.Equal(typeof(DeadPlant), plant.GetType()); }
public void GrowPlantStages() { ISoil soil = new Soil(); IPlant plant = new IdentifiedSeed("Carrot", PlantType.Vegetable); plant.Plant(soil); plant = plant.Grow(); // Seedling plant = plant.Grow(); // Vegetative plant = plant.Grow(); // Flowering plant = plant.Grow(); // Harvestable Debug.WriteLine($"GrowPlantStages: Plant Type: {plant.Name}"); Assert.True(plant.IsHarvestable); }
public void HarvestPlant() { ISoil soil = new Soil(); IPlant plant = new IdentifiedSeed("Carrot", PlantType.Vegetable); plant.Plant(soil); plant = plant.Grow(); // Seedling plant = plant.Grow(); // Vegetative plant = plant.Grow(); // Flowering plant = plant.Grow(); // Harvestable IHarvestable product = plant.Harvest(); Assert.Equal(typeof(Vegetable), product.GetType()); }
public void GrowIdentifiedSeed() { ISoil soil = new Soil(); IPlant plant = new IdentifiedSeed("Carrot", PlantType.Vegetable); plant.Plant(soil); plant = plant.Grow(); Assert.True(plant.IsGrowing); }