Example #1
0
 public void Construct_GivenNullWriter_ShouldThrowArgumentNullException()
 {
     //----Setup---------------------------------------------
     //----Execute-------------------------------------------
     ISorter sorter = new AddressStreetNameSorter(null);
     //----Assert--------------------------------------------
     Assert.Fail("Expected Exception Not Thrown!");
 }
Example #2
0
 public void Construct_ShouldBeTypeISorter()
 {
     //----Setup---------------------------------------------
     //----Execute-------------------------------------------
     var sorter = new AddressStreetNameSorter(GetFileWriter());
     //----Assert--------------------------------------------
     Assert.IsInstanceOfType(sorter, typeof(ISorter));
 }
Example #3
0
 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");
 }