示例#1
0
        public void ADOCanEditDvd()
        {
            var    repo         = new DvdRepositoryADO();
            int    dvdId        = 1;
            string title        = "Updated Dvd";
            int    releaseYear  = 1990;
            string directorName = "Jacob";
            string ratingName   = "PG-13";
            string notes        = "This has been updated";

            repo.Edit(dvdId, title, releaseYear, directorName, ratingName, notes);

            var updatedDvd = repo.GetById(1);

            Assert.AreEqual(1, updatedDvd.DvdId);
            Assert.AreEqual("Updated Dvd", updatedDvd.Title);
            Assert.AreEqual(1990, updatedDvd.ReleaseYear);
            Assert.AreEqual("Jacob", updatedDvd.Director);
            Assert.AreEqual("PG-13", updatedDvd.Rating);
            Assert.AreEqual("This has been updated", updatedDvd.Notes);
        }