public void Construct_GivenNullWriter_ShouldThrowArgumentNullException() { //----Setup--------------------------------------------- //----Execute------------------------------------------- ISorter sorter = new AddressStreetNameSorter(null); //----Assert-------------------------------------------- Assert.Fail("Expected Exception Not Thrown!"); }
public void Construct_ShouldBeTypeISorter() { //----Setup--------------------------------------------- //----Execute------------------------------------------- var sorter = new AddressStreetNameSorter(GetFileWriter()); //----Assert-------------------------------------------- Assert.IsInstanceOfType(sorter, typeof(ISorter)); }
public void PerformSort_GivenCustomerRecords_ShouldSortByStreetName() { //----Setup--------------------------------------------- ISorter sorter = new AddressStreetNameSorter(GetFileWriter()); //----Execute------------------------------------------- var sortedList = sorter.PerformSort(_records); //----Assert-------------------------------------------- Assert.IsTrue(sortedList.First() == "221 Apple St"); }