public void GivenEmptyRepoWhenAdd1ThenGet1InRepo() { var initialTomatoes = _tomatoRepository.GetAll(); Assert.AreEqual(0, initialTomatoes.Count); var newTomato = new Tomato(); _tomatoRepository.Add(newTomato); var fetchedTomatoes = _tomatoRepository.GetAll(); Assert.AreEqual(1, fetchedTomatoes.Count); }
public void Add(Tomato tomato) { _tomatoes.Add(tomato); }