示例#1
0
        public void InstanceOk()
        {
            //create an instance of the class we want to create
            clsShowingCollection AllShowings = new clsShowingCollection();

            //test to see that it exists
            Assert.IsNotNull(AllShowings);
        }
示例#2
0
        public void CountPropertyOk()
        {
            //create the instance of the class we want to create
            clsShowingCollection AllShowings = new clsShowingCollection();
            //create some test data to assign to the property
            Int32 SomeCount = 1;

            //assign the data to the property
            AllShowings.Count = SomeCount;
            //test to see that the two values are the same
            Assert.AreEqual(AllShowings.Count, SomeCount);
        }
示例#3
0
        public void AllShowingOK()
        {
            //create an instance of the class we want to create
            clsShowingCollection Showing = new clsShowingCollection();
            //create some test data to assign to the property
            //in this case the data needs to be a list of objects
            List <clsShowing> TestList = new List <clsShowing>();
            //add an item to the list
            //create the item of the test data
            clsShowing TestItem = new clsShowing();

            //set its properties
            TestItem.ShowingId   = 1;
            TestItem.ShowingName = "Shrek";
            //add the item to the test list
            TestList.Add(TestItem);
            //assign the data to the property
            Showing.AllShowing = TestList;
            //test to see that the two values are the same
            Assert.AreEqual(Showing.AllShowing, TestList);
        }