public void ReturnAnEmptyListIfNoConsistentNumbers() { var fileName = @$ "{Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName}/AppData/phone_data_5.txt"; var testPhoneList2 = PhoneNumber.GetPhoneNumbers(fileName); Assert.Empty(PhoneNumberCheck.GetInconsistentNumbers(testPhoneList2)); }
public void ReturnAListContainingInconsistentNumbers() { var bob = new PhoneNumber("Bob", "91125426"); var alice = new PhoneNumber("Alice", "97625992"); var emergency = new PhoneNumber("Emergency", "911"); var testPhoneList = new List <PhoneNumber> { bob, alice, emergency }; var expectedResultList = new List <PhoneNumber>() { emergency, bob }; var actual = PhoneNumberCheck.GetInconsistentNumbers(testPhoneList).ToList(); Assert.Equal(2, actual.Count()); Assert.Equal(expectedResultList.First(), actual.First()); Assert.Equal(expectedResultList.Last(), actual.Last()); }