public void GetIntFromStrings_StringsEmptyCollection_ArgumentException() { // Arrange var testFoo = new Foo(); List<string> testStringsInput = new List<string>(); // Act testFoo.GetIntFromStrings(testStringsInput); // Assert omitted because we are expecting an Exception }
public void GetIntFromStrings_NullStrings_ArgumentNullException() { // Arrange var testFoo = new Foo(); List<string> testStringsInput = null; // Act testFoo.GetIntFromStrings(testStringsInput); // Assert omitted because we are expecting an Exception }
public void GetIntFromStrings_NotAllStringsParseableToInt_NotAllStringsParsedCorrectlyToInt() { //Arrange var testFoo = new Foo(); var testStringsInput = new List<string>() { "1", "DORP", "15", "18" }; //Act var ints = testFoo.GetIntFromStrings(testStringsInput); //Assert Assert.IsNotNull(ints); Assert.AreEqual(3, ints.Count); Assert.AreEqual(15, ints[1]); Assert.AreEqual(18, ints[2]); }