public void FindSums_EmptyInput_ReturnsEmptyList() { // arrange var list = new List <string>() { }; // act var result = ProgramReadable.FindSums(list); // assert Assert.IsNotNull(result); Assert.IsEmpty(result); }
public void FindSums_ListContainingNoValidTrio_ReturnsEmptyList() { // arrange var list = new List <string>() { "ABC's", "a", "A'asia", }; // act var result = ProgramReadable.FindSums(list); // assert Assert.IsEmpty(result); }
public void FindSums_ListContaininValidTrio_ReturnsTrio() { // arrange var list = new List <string>() { "aaa", "bbb", "aaabbb" }; // act var result = ProgramReadable.FindSums(list); // assert Assert.AreEqual(("aaa", "bbb", "aaabbb"), result.ToArray()[0]); }
public void FindSums_ListContainin1ValidTrioAndSomeExtraWord_Returns1Trio() { // arrange var list = new List <string>() { "aaa", "wha", "bbb", "aaabbb", }; // act var result = ProgramReadable.FindSums(list); // assert Assert.Contains(("aaa", "bbb", "aaabbb"), result.ToArray()); }
public void FindSums_ListContainin2ValidTrios_Returns2Trios() { // arrange var list = new List <string>() { "aaa", "bbb", "aaabbb", "xxx", "yyy", "xxxyyy", }; // act var result = ProgramReadable.FindSums(list); // assert Assert.Contains(("aaa", "bbb", "aaabbb"), result.ToArray()); Assert.Contains(("xxx", "yyy", "xxxyyy"), result.ToArray()); }