public void ContinentDeleteCountryAlreadyRemovedThrowsExceptionTest() { Continent continent = new Continent("Azië"); Country country = new Country("vietnam", 95540000, 331.212f, continent); continent.AddCountry(country); continent.DeleteCountry(country); Action act = () => continent.DeleteCountry(country); act.Should().Throw <ArgumentException>().WithMessage("country is not in Azië"); }
public void ContinentDeleteCountryTest() { Continent continent = new Continent("Azië"); Country country = new Country("vietnam", 95540000, 331.212f, continent); continent.AddCountry(country); Action act = () => continent.DeleteCountry(country); act.Should().NotThrow(); }
public void ContinentDeleteCountryNullThrowsExceptionTest() { Continent continent = new Continent("Azië"); Country country = new Country("vietnam", 95540000, 331.212f, continent); continent.AddCountry(country); Action act = () => continent.DeleteCountry(null); act.Should().Throw <ArgumentException>().WithMessage("country can't be null"); }