Ejemplo n.º 1
0
        public void ReportByConsoleTestDataFound()
        {
            //instance of filtered data
            clsConsoleCollection FilteredConsoles = new clsConsoleCollection();
            Boolean OK = true;

            //apply Console Name that does not exist
            FilteredConsoles.ReportByConsoleName("Nintendo N64");
            //check that current record of records are found
            if (FilteredConsoles.Count == 2)
            {
                if (FilteredConsoles.ConsoleList[0].ConsoleNo != 3)
                {
                    OK = false;
                }
                if (FilteredConsoles.ConsoleList[0].ConsoleNo != 4)
                {
                    OK = false;
                }
            }
            else
            {
                OK = false;
            }
            //test to see if there's no records
            Assert.IsTrue(OK);
        }
Ejemplo n.º 2
0
        public void ReportByConsoleNameNoneFound()
        {   //instance of filtered data
            clsConsoleCollection FilteredConsoles = new clsConsoleCollection();

            FilteredConsoles.ReportByConsoleName("xx xxx");
            //tests to see if there are no records
            Assert.AreEqual(0, FilteredConsoles.Count);
        }
Ejemplo n.º 3
0
        public void ReportByConsoleNameMethodOK()
        {
            //create instance of class we want to create
            clsConsoleCollection AllConsoles = new clsConsoleCollection();
            //create instance of filtered data
            clsConsoleCollection FilteredConsoles = new clsConsoleCollection();

            FilteredConsoles.ReportByConsoleName("Xbox");
            //test to see if both data is the same
            Assert.AreEqual(AllConsoles.Count, FilteredConsoles.Count);
        }