Beispiel #1
0
        public void AbsorbWater()
        {
            ISoil  soil  = new Soil();
            IPlant plant = new IdentifiedSeed("Carrot", PlantType.Vegetable);

            plant.Plant(soil);

            plant.Drink();
        }
Beispiel #2
0
        public void PlantSeedInSoil()
        {
            ISoil  soil  = new Soil();
            IPlant plant = new IdentifiedSeed("Carrot", PlantType.Vegetable);

            plant.Plant(soil);

            Assert.True(soil.IsOccupied);
        }
Beispiel #3
0
        public void GrowIdentifiedSeed()
        {
            ISoil  soil  = new Soil();
            IPlant plant = new IdentifiedSeed("Carrot", PlantType.Vegetable);

            plant.Plant(soil);
            plant = plant.Grow();

            Assert.True(plant.IsGrowing);
        }
Beispiel #4
0
        public void UprootPlant()
        {
            ISoil  soil  = new Soil();
            IPlant plant = new IdentifiedSeed("Carrot", PlantType.Vegetable);

            plant.Plant(soil);
            plant.Uproot();

            Assert.False(soil.IsOccupied);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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());
        }