Beispiel #1
0
        public void ReportByPostCodeNoneFound()
        {
            clsOfficeCollection FilteredOffices = new clsOfficeCollection();

            FilteredOffices.ReportByPostCode("xxy xxx");
            Assert.AreEqual(0, FilteredOffices.Count);
        }
Beispiel #2
0
        public void ReportByPostCodeMethodOK()
        {
            clsOfficeCollection AllOffices      = new clsOfficeCollection();
            clsOfficeCollection FilteredOffices = new clsOfficeCollection();

            FilteredOffices.ReportByPostCode("");
            Assert.AreEqual(AllOffices.Count, FilteredOffices.Count);
        }
Beispiel #3
0
        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);
        }