Beispiel #1
0
        public void Delete_RemoveFromDatabase_DecrementDatabase()
        {
            // This test will check to see if the delete functionality of the program can successfully remove items from the database
            // arrange
            Venue newVenue = new Venue("Fire");

            newVenue.Save();
            Venue otherVenue = new Venue("Water");

            otherVenue.Save();

            // act
            newVenue.Delete();

            // assert
            Assert.Equal(1, Venue.GetAll().Count);
        }
Beispiel #2
0
        public void Delete_RemoveFromJoinTable_DecrementDatabase()
        {
            // This test will check to see if the delete functionality of the program can successfully remove items from the join table
            // arrange
            Band newBand = new Band("Fire");

            newBand.Save();
            Venue newVenue = new Venue("Boston");

            newVenue.Save();

            // act
            newBand.AddVenue(newVenue);
            newVenue.Delete();

            // assert
            Assert.Equal(0, newBand.GetVenues().Count);
        }