public void GetAll_DatabaseEmptyAtFirst_ZeroOutput() { //Arrange, Act int result = Band.GetAll().Count; //Assert Assert.Equal(0, result); }
public static Dictionary <string, object> ModelMaker() { Dictionary <string, object> model = new Dictionary <string, object> { { "Bands", Band.GetAll() }, { "Venues", Venue.GetAll() }, }; return(model); }
public void Band_Delete_RemoveObjectFromDatabase() { Band testBand = new Band("Green Day"); testBand.Save(); testBand.DeleteThis(); Assert.Equal(0, Band.GetAll().Count); }
public void Band_Save_NoSaveOnDuplicateBand() { Band testBand = new Band("Green Day"); testBand.Save(); Band secondBand = new Band("Green Day"); secondBand.Save(); Assert.Equal(1, Band.GetAll().Count); }
public void Save_OneBand_BandSavedWithCorrectID() { //Arrange Band testBand = new Band("Green Day"); testBand.Save(); Band savedBand = Band.GetAll()[0]; //Act int output = savedBand.GetId(); int verify = testBand.GetId(); //Assert Assert.Equal(verify, output); }
public void Save_OneBand_BandSavedToDatabase() { //Arrange Band testBand = new Band("Green Day"); //Act testBand.Save(); List <Band> output = Band.GetAll(); List <Band> verify = new List <Band> { testBand }; //Assert Assert.Equal(verify, output); }
public void SaveGetAll_ManyBands_ReturnListOfBands() { //Arrange Band bandOne = new Band("Green Day"); bandOne.Save(); Band bandTwo = new Band("Spice Girl"); bandTwo.Save(); //Act List <Band> output = Band.GetAll(); List <Band> verify = new List <Band> { bandOne, bandTwo }; //Assert Assert.Equal(verify, output); }