Beispiel #1
0
        public void CountPropertyOk()
        {
            clsGenreCollection allGenres = new clsGenreCollection();
            Int32 count = 19;

            allGenres.Count = count;
            Assert.AreEqual(allGenres.Count, count);
        }
Beispiel #2
0
        public void InstanceOK()
        {
            //Create an instance of the class we want to create
            clsGenreCollection AllGenres = new clsGenreCollection();

            //Test to see that it exists
            Assert.IsNotNull(AllGenres);
        }
        void LoadGenres()
        {
            clsGenreCollection AllGenres = new clsGenreCollection();

            ddlGenres.DataSource     = AllGenres.AllGenres;
            ddlGenres.DataValueField = "GenreId";
            ddlGenres.DataTextField  = "GenreDesc";
            ddlGenres.DataBind();
        }
Beispiel #4
0
        public void CountPropertyOK()
        {
            //Create an instance of the class we want to create
            clsGenreCollection AllGenres = new clsGenreCollection();
            //Create some test data to align to the property
            Int32 SomeCount = 8;

            //Assign the data to the property
            AllGenres.Count = SomeCount;
            Assert.AreEqual(AllGenres.Count, SomeCount);
        }
Beispiel #5
0
        public void CountMatchesList()
        {
            clsGenreCollection genres   = new clsGenreCollection();
            List <clsGenre>    testList = new List <clsGenre>();
            clsGenre           testItem = new clsGenre();

            testItem.GenreId   = 1;
            testItem.GenreDesc = "Sci-Fi";
            testList.Add(testItem);
            genres.AllGenres = testList;
            Assert.AreEqual(genres.Count, testList.Count);
        }
Beispiel #6
0
        public void CountMatchesList()
        {
            //Create an instance of the class we want to create
            clsGenreCollection Genres = new clsGenreCollection();
            //Create some test data to align to the property
            //In this case, the data needs to be a list of objects
            List <clsGenre> TestList = new List <clsGenre>();
            //Add an item to the list
            //Create an item of test data
            clsGenre TestItem = new clsGenre();

            //Set its properties
            TestItem.GenreID    = 1;
            TestItem.GenreTitle = "Action";
            //Add the item to the test list
            TestList.Add(TestItem);
            //Assign the data to the property
            Genres.GenreList = TestList;
            //Test to see that the two values are the same
            Assert.AreEqual(Genres.Count, TestList.Count);
        }
Beispiel #7
0
        public void InstanceOk()
        {
            clsGenreCollection allGenres = new clsGenreCollection();

            Assert.IsNotNull(allGenres);
        }