Exemplo n.º 1
0
        public void ADOCanDeleteDvd()
        {
            var repo = new DvdRepositoryADO();
            var dvds = repo.GetAllDvd();

            Assert.AreEqual(4, dvds.Count());
            repo.Delete(4);
            dvds = repo.GetAllDvd();
            Assert.AreEqual(3, dvds.Count());
        }
Exemplo n.º 2
0
        public void ADOCanLoadDvds()
        {
            var repo = new DvdRepositoryADO();
            var dvds = repo.GetAllDvd();

            Assert.AreEqual(4, dvds.Count);
        }
Exemplo n.º 3
0
        public void ADOCanAddDvd()
        {
            Dvd dvdToAdd = new Dvd();
            var repo     = new DvdRepositoryADO();

            string title        = "Brand new movie";
            int    releaseYear  = 2017;
            string directorName = "NewDirector";
            string ratingName   = "PG";
            string notes        = "It's brand new";

            repo.SaveNew(title, releaseYear, directorName, ratingName, notes);

            Assert.AreEqual(5, repo.GetAllDvd().Count());
        }