public void WhenConfigureIsCalled_ThenAnimalsAreInstantiated() { _zoo.Start(); Assert.IsNotNull(_zoo.Animals); Assert.IsNotEmpty(_zoo.Animals); Assert.AreEqual(_zooDataProvider.GetAnimalTypes().Sum(x => x.Population), _zoo.Animals.Count); Assert.IsTrue(_zoo.Started); }
public void ItGetsAnimalTypesFromJsonFile() { IEnumerable <ZooAnimalType> animalTypes = null; Assert.DoesNotThrow(() => animalTypes = _provider.GetAnimalTypes()); //I know what's in the file so I can make assertions Assert.True(animalTypes != null); Assert.True(animalTypes.Count() == 3); }