Created
September 8, 2023 11:23
-
-
Save stijnmoreels/61b4703d27da479083d628ecc48977c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Fact] | |
| public void Potato_Grows() | |
| { | |
| var plantProvider = new PlantProvider(Logger); | |
| PlantType plantType = plantProvider.GetPlantType(PlantType.Potato); | |
| var context = PlantTestContext.Given(plantType); | |
| var soilRepository = new SoilRepository(context.Configuration, Logger); | |
| var drySoil = soilRepository.GetSoil(SoleType.Sandy); | |
| var waterMachine = new WaterSprinkler(context.Configuration, Logger); | |
| var wetSoil = waterMachine.Water(soil, frequency: TimeSpan.FromDays(1)); | |
| var growMachine = new PlantGrow(plantType); | |
| PlantResult plantResult = growMachine.GrowIn(wetSoil); | |
| Assert.True(plantResult.Roots.Count > 0, "Should have roots"); | |
| Assert.True(plantResult.Vegetable.HasValue, "Should have vegetable"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment