public void ReportByPostCodeNoneFound() { clsOfficeCollection FilteredOffices = new clsOfficeCollection(); FilteredOffices.ReportByPostCode("xxy xxx"); Assert.AreEqual(0, FilteredOffices.Count); }
public void ReportByPostCodeMethodOK() { clsOfficeCollection AllOffices = new clsOfficeCollection(); clsOfficeCollection FilteredOffices = new clsOfficeCollection(); FilteredOffices.ReportByPostCode(""); Assert.AreEqual(AllOffices.Count, FilteredOffices.Count); }
public void ReportByPostCodeTestDataFound() { clsOfficeCollection FilteredOffices = new clsOfficeCollection(); Boolean OK = true; FilteredOffices.ReportByPostCode("xxx xxx"); if (FilteredOffices.Count == 2) { if (FilteredOffices.OfficeList[0].OfficeCode != 11) { OK = false; } if (FilteredOffices.OfficeList[1].OfficeCode != 13) { OK = false; } } else { OK = false; } Assert.IsTrue(OK); }