Exemplo n.º 1
0
        public void Venue_TestVenueIsEmptyAtFirst()
        {
            //Arrange, Act
            int result = Venue.GetAll().Count;

            Assert.Equal(0, result);
        }
Exemplo n.º 2
0
        public void Venue_GetAll_DatabaseEmptyOnload()
        {
            List <Venue> testList    = Venue.GetAll();
            List <Venue> controlList = new List <Venue> {
            };

            Assert.Equal(controlList, testList);
        }
Exemplo n.º 3
0
        public void Test_DatabaseEmptyAtFirst()
        {
            //Arrange, Act
            int result = Venue.GetAll().Count;

            //Assert
            Assert.Equal(0, result);
        }
Exemplo n.º 4
0
        public void GetAll_ReturnsEmpty_true()
        {
            //Arrange
            //Act
            int result = Venue.GetAll().Count;

            //Assert
            Assert.Equal(0, result);
        }
Exemplo n.º 5
0
        public static Dictionary <string, object> ModelMaker()
        {
            Dictionary <string, object> model = new Dictionary <string, object> {
            };

            model.Add("bands", Band.GetAll());
            model.Add("venues", Venue.GetAll());
            return(model);
        }
Exemplo n.º 6
0
        public void Venue_Save_SaveToDatabase()
        {
            Venue newVenue = new Venue("ModaCenter", 5000);

            newVenue.Save();

            Venue testVenue = Venue.GetAll()[0];

            Assert.Equal(newVenue, testVenue);
        }
Exemplo n.º 7
0
        public void Delete_RemoveVenueFromDatabase_Deleted()
        {
            Venue newVenue = new Venue("High Dive");

            newVenue.Save();

            Venue.Delete(newVenue.GetId());

            Assert.Equal(0, Venue.GetAll().Count);
        }
Exemplo n.º 8
0
        public void Delete_DeleteBandFromVenue()
        {
            Venue newVenue = new Venue("Tractor Tavern");

            newVenue.Save();

            Venue.Delete(newVenue.GetId());

            Assert.Equal(0, Venue.GetAll().Count);
        }
Exemplo n.º 9
0
        public void Save_SavesToDb_True()
        {
            //Arrange
            Venue newVenue = new Venue("Akron Agora", "3308698686");

            newVenue.Save();
            //Act
            List <Venue> foundVenues = Venue.GetAll();

            //Assert
            Assert.Equal(1, foundVenues.Count);
        }
Exemplo n.º 10
0
        public void Update_UpdateVenueNameAndAddress_NameAndAddressUpdatedInDatabase()
        {
            Venue testVenue = new Venue("Hilton Lounge", "Beaverton, OR");

            testVenue.Save();

            testVenue.Update("Magestic Club", "Tigard, OR");
            Venue result       = Venue.GetAll()[0];
            Venue UpdatedVenue = new Venue("Magestic Club", "Tigard, OR", testVenue.Id);

            Assert.Equal(result, UpdatedVenue);
        }
Exemplo n.º 11
0
        public void T4_Save_AssignsIdToVenue()
        {
            Venue testVenue = new Venue("Paramount Theatre");

            testVenue.Save();

            Venue savedVenue = Venue.GetAll()[0];
            int   result     = savedVenue.GetId();
            int   testId     = testVenue.GetId();

            Assert.Equal(testId, result);
        }
Exemplo n.º 12
0
        public void Save_SaveToDatabase_SaveWithId()
        {
            Venue testVenue = new Venue("THE SPACE");

            testVenue.Save();
            Venue savedVenue = Venue.GetAll()[0];

            int result   = savedVenue.GetId();
            int expected = testVenue.GetId();

            Assert.Equal(expected, result);
        }
Exemplo n.º 13
0
        public void Save_SavesVenueToDatabase_true()
        {
            //Arrange
            Venue newVenue = new Venue("Doug Fir");

            //Act
            newVenue.Save();
            List <Venue> allVenues = Venue.GetAll();

            //Assert
            Assert.Equal(newVenue, allVenues[0]);
        }
Exemplo n.º 14
0
        public void TEST_Save_SaveVenueToDB()
        {
            Venue testVenue = new Venue("El Corozon");

            testVenue.Save();
            List <Venue> allVenues = new List <Venue> {
                testVenue
            };

            Venue.GetAll()[0].GetName();

            Assert.Equal(allVenues, Venue.GetAll());
        }
Exemplo n.º 15
0
        public void Save_SaveToDatabase_Save()
        {
            Venue testVenue = new Venue("THE SPACE");

            testVenue.Save();

            List <Venue> result   = Venue.GetAll();
            List <Venue> expected = new List <Venue> {
                testVenue
            };

            Assert.Equal(expected, result);
        }
Exemplo n.º 16
0
        public void Delete_DeletesSpecificVenue()
        {
            Venue venue = new Venue("The Showbox");

            venue.Save();
            venue.Delete();

            List <Venue> expectedResult = new List <Venue> {
            };
            List <Venue> actualResult   = Venue.GetAll();

            Assert.Equal(expectedResult, actualResult);
        }
Exemplo n.º 17
0
        public void GetAll_ReturnsAllVenues_List()
        {
            Venue newVenue = new Venue("The Showbox");

            newVenue.Save();

            List <Venue> expectedResult = new List <Venue> {
                newVenue
            };
            List <Venue> actual = Venue.GetAll();

            Assert.Equal(expectedResult, actual);
        }
Exemplo n.º 18
0
        public void DeleteAll_DeleteAllVenues_Deleted()
        {
            Venue venue1 = new Venue("The Moore");

            venue1.Save();
            Venue venue2 = new Venue("The Crocodile");

            venue2.Save();

            Venue.DeleteAll();

            Assert.Equal(0, Venue.GetAll().Count);
        }
Exemplo n.º 19
0
        public void Delete_DeletesVenueFromDb_True()
        {
            //Arrange
            Venue newVenue = new Venue("Akron Agora", "3308698686");

            newVenue.Save();
            //Act
            newVenue.Delete();
            List <Venue> foundVenues = Venue.GetAll();

            //Assert
            Assert.Equal(0, foundVenues.Count);
        }
Exemplo n.º 20
0
        public void Save_SavesToDatabase_true()
        {
            Venue testVenue = new Venue("Crystal Ballroom");

            testVenue.Save();

            List <Venue> result   = Venue.GetAll();
            List <Venue> testList = new List <Venue> {
                testVenue
            };

            Assert.Equal(testList, result);
        }
Exemplo n.º 21
0
        public void Test_Deletes_Venue()
        {
            Venue newVenue = new Venue("Dante's Inferno");

            newVenue.Save();
            newVenue.Delete();

            List <Venue> expected = new List <Venue> {
            };
            List <Venue> result   = Venue.GetAll();

            Assert.Equal(expected, result);
        }
Exemplo n.º 22
0
        public void Test3_SavesToDatabase()
        {
            Venue testVenue = new Venue("Skydome");

            testVenue.Save();

            List <Venue> result   = Venue.GetAll();
            List <Venue> testList = new List <Venue> {
                testVenue
            };

            Assert.Equal(testList, result);
        }
Exemplo n.º 23
0
        public void Test4_Save_AssignsId()
        {
            Venue testVenue = new Venue("Skydome");

            testVenue.Save();

            Venue savedVenue = Venue.GetAll()[0];

            int result = savedVenue.GetId();
            int testId = testVenue.GetId();

            Assert.Equal(testId, result);
        }
Exemplo n.º 24
0
        public void Test_Save_AssignsIdToSavedObject()
        {
            Venue testVenue = new Venue("Staples Center", "Los Angeles, CA");

            testVenue.Save();

            Venue savedVenue = Venue.GetAll()[0];

            int result   = savedVenue.Id;
            int expected = testVenue.Id;

            Assert.Equal(expected, result);
        }
Exemplo n.º 25
0
        public void Test_Save_SavesVenueToDatabase()
        {
            Venue testVenue = new Venue("Staples Center", "Los Angeles, CA");

            testVenue.Save();

            List <Venue> result   = Venue.GetAll();
            List <Venue> testList = new List <Venue> {
                testVenue
            };

            Assert.Equal(testList, result);
        }
Exemplo n.º 26
0
        public void T3_Save_SavesToDB()
        {
            Venue testVenue = new Venue("Paramount Theatre");

            testVenue.Save();

            List <Venue> result   = Venue.GetAll();
            List <Venue> testList = new List <Venue> {
                testVenue
            };

            Assert.Equal(testList, result);
        }
Exemplo n.º 27
0
        public void GetAll_true()
        {
            Venue venueOne = new Venue("Crystal Ballroom");

            venueOne.Save();
            Venue venueTwo = new Venue("Moda Center");

            venueTwo.Save();

            int result = Venue.GetAll().Count;


            Assert.Equal(2, result);
        }
Exemplo n.º 28
0
        public void Delete_OneVenue_VenueDeleted()
        {
            Venue testVenue1 = new Venue("ven1");
            testVenue1.Save();
            Venue testVenue2 = new Venue("ven2");
            testVenue2.Save();

            testVenue1.Delete(testVenue1.GetId());

            List<Venue> allVenues = Venue.GetAll();
            List<Venue> expected = new List<Venue>{testVenue2};

            Assert.Equal(expected, allVenues);
        }
Exemplo n.º 29
0
        public void Test_Save_AssignsIdToObject()
        {
            //Arrange
            Venue testVenue = new Venue("The Neptune");

            //Act
            testVenue.Save();
            Venue savedVenue = Venue.GetAll()[0];
            int   result     = savedVenue.GetId();
            int   testId     = testVenue.GetId();

            //Assert
            Assert.Equal(testId, result);
        }
Exemplo n.º 30
0
        public void Test_Save_SavesToDatabase()
        {
            //Arrange
            Venue testVenue = new Venue("The Crocodile");

            //Act
            testVenue.Save();
            List <Venue> result   = Venue.GetAll();
            List <Venue> testList = new List <Venue> {
                testVenue
            };

            //Assert
            Assert.Equal(testList, result);
        }