public void ShouldVerifyOptionsAndThrowExceptionWhenNull() { // Sut var sut = new ArgumentProcessorBuilder().Build(); // Act, Assert Assert.ThrowsException <ArgumentException>(() => { sut.VerifyOptions(null); }); }
public void ShouldVerifyOptionsAndThrowException() { // Arrange var extra = new List <string>(); // Sut var sut = new ArgumentProcessorBuilder().Build(); // Act, Assert Assert.ThrowsException <ArgumentException>(() => { sut.VerifyOptions(extra); }); }
public void ShouldThrowWhenNoCities() { // Arrange var cityString = ""; var cityString2 = ""; // Sut var sut = new ArgumentProcessorBuilder().Build(); // Act, Assert Assert.ThrowsException <ArgumentException>(() => { sut.GetCitiesNamesFrom(new string[] { cityString, cityString2 }); }); }
public void ShouldVerifyOptionsSuccessfully() { // Arrange var extra = new List <string> { "weather" }; // Sut var sut = new ArgumentProcessorBuilder().Build(); // Act, Assert sut.VerifyOptions(extra); Assert.IsTrue(true); }
public void ShouldReturnListOfCities() { // Arrange var cityString = "Kiev,Vilnius,Riga"; // Sut var sut = new ArgumentProcessorBuilder().Build(); // Act var result = sut.GetCitiesNamesFrom(new string[] { cityString }); // Assert var cityList = result.ToList(); Assert.IsTrue(cityList.Count == 3); }