public void Band_TestBandIsEmptyAtFirst() { //Arrange, Act int result = Band.GetAll().Count; Assert.Equal(0, result); }
public void Test_DatabaseEmptyAtFirst() { //Arrange, Act int result = Band.GetAll().Count; //Assert Assert.Equal(0, result); }
public void Band_GetAll_DatabaseEmptyOnload() { List <Band> testList = Band.GetAll(); List <Band> controlList = new List <Band> { }; Assert.Equal(controlList, testList); }
public void GetAll_DatabaseEmpty_true() { //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> { }; model.Add("bands", Band.GetAll()); model.Add("venues", Venue.GetAll()); return(model); }
public void Delete_RemoveBandFromDatabase_Deleted() { Band newBand = new Band("Adele"); newBand.Save(); Band.Delete(newBand.GetId()); Assert.Equal(0, Band.GetAll().Count); }
public void Band_Save_SaveToDatabase() { Band newBand = new Band("Maroon5"); newBand.Save(); Band testBand = Band.GetAll()[0]; Assert.Equal(newBand, testBand); }
public void Save_SaveToDatabase_SaveWithId() { Band testBand = new Band("THE SPACE"); testBand.Save(); Band savedBand = Band.GetAll()[0]; int result = savedBand.GetId(); int expected = testBand.GetId(); Assert.Equal(expected, result); }
public void Save_SavesToDb_True() { //Arrange Band newBand = new Band("Misery Jackyls", "3308698686"); newBand.Save(); //Act List <Band> foundBands = Band.GetAll(); //Assert Assert.Equal(1, foundBands.Count); }
public void Save_SavesBandToDatabase_true() { //Arrange Band newBand = new Band("Sublime"); //Act newBand.Save(); List <Band> allBands = Band.GetAll(); //Assert Assert.Equal(newBand, allBands[0]); }
public void Test3_SavesToDatabase() { Band testBand = new Band("Nirvana"); testBand.Save(); List <Band> result = Band.GetAll(); List <Band> testList = new List <Band> { testBand }; Assert.Equal(testList, result); }
public void T4_Save_AssignsIdToBand() { Band testBand = new Band("Brand New"); testBand.Save(); Band savedBand = Band.GetAll()[0]; int result = savedBand.GetId(); int testId = testBand.GetId(); Assert.Equal(testId, result); }
public void GetAll_ReturnsAllBands_List() { Band newBand = new Band("Journey"); newBand.Save(); List <Band> expectedResult = new List <Band> { newBand }; List <Band> actual = Band.GetAll(); Assert.Equal(expectedResult, actual); }
public void Test4_SavesIdForBandObject() { Band testBand = new Band("Nirvana"); testBand.Save(); Band savedBand = Band.GetAll()[0]; int result = savedBand.GetId(); int testId = testBand.GetId(); Assert.Equal(testId, result); }
public void Save_ReturnsBandName_name() { Band newBand = new Band("Radiohead"); newBand.Save(); List <Band> expected = new List <Band> { newBand }; List <Band> result = Band.GetAll(); Assert.Equal(expected, result); }
public void Test_Save_AssignsIdToSavedObject() { Band testBand = new Band("Some Band Name", "Some Band Description"); testBand.Save(); Band savedBand = Band.GetAll()[0]; int result = savedBand.Id; int expected = testBand.Id; Assert.Equal(expected, result); }
public void T3_Save_SavesToDB() { Band testBand = new Band("Brand New"); testBand.Save(); List <Band> result = Band.GetAll(); List <Band> testList = new List <Band> { testBand }; Assert.Equal(testList, result); }
public void DeleteAll_DeleteAllBands_Deleted() { Band band1 = new Band("Lucas Graham"); band1.Save(); Band band2 = new Band("Ray LaMontagne"); band2.Save(); Band.DeleteAll(); Assert.Equal(0, Band.GetAll().Count); }
public void Test_Save_SavesBandToDatabase() { Band testBand = new Band("Some Band Name", "Some Band Description"); testBand.Save(); List <Band> result = Band.GetAll(); List <Band> testList = new List <Band> { testBand }; Assert.Equal(testList, result); }
public void Save_SaveToDatabase_Save() { Band testBand = new Band("THE SPACE"); testBand.Save(); List <Band> result = Band.GetAll(); List <Band> expected = new List <Band> { testBand }; Assert.Equal(expected, result); }
public void Test_Save_AssignsIdToBandObject() { //Arrange Band testBand = new Band("The Rough Nighters"); testBand.Save(); //Act Band savedBand = Band.GetAll()[0]; int result = savedBand.GetId(); int testId = testBand.GetId(); //Assert Assert.Equal(testId, result); }
public void GetAll_true() { //Arrange Band bandOne = new Band("Black Keys"); bandOne.Save(); Band bandTwo = new Band("Modest Mouse"); bandTwo.Save(); // Act int result = Band.GetAll().Count; //Assert Assert.Equal(2, result); }
public void Test_Save_AssignsIdToObject() { //Arrange Band testBand = new Band("Pentatonix", "Pop", "Problem"); //Act testBand.Save(); Band savedBand = Band.GetAll()[0]; int result = savedBand.GetId(); int testId = testBand.GetId(); //Assert Assert.Equal(testId, result); }
public void GetAll_RetrievesAllBandsFromDatabase() { //Arrange Band bandOne = new Band("Wilco"); bandOne.Save(); Band bandTwo = new Band("John Prine"); bandTwo.Save(); // Act int result = Band.GetAll().Count; //Assert Assert.Equal(2, result); }
public void Test_Save_SavesToDatabase() { //Arrange Band testBand = new Band("John Mayer"); //Act testBand.Save(); List <Band> result = Band.GetAll(); List <Band> testList = new List <Band> { testBand }; //Assert Assert.Equal(testList, result); }
public void Test_Save_SavesToDatabase() { //Arrange Band testBand = new Band("Pentatonix", "Pop", "Problem"); //Act testBand.Save(); List <Band> result = Band.GetAll(); List <Band> testList = new List <Band> { testBand }; //Assert Assert.Equal(testList, result); }
public void Test_Save_AssignsIdToObject() { //Arrange Band testBand = new Band("Brittany Spears"); //Act testBand.Save(); Band savedBand = Band.GetAll()[0]; int result = savedBand.GetId(); int testId = testBand.GetId(); //Assert Assert.Equal(testId, result); }
public void Test_Save_SavesBandToDatabase() { //Arrange Band testBand = new Band("The LoudMouths"); testBand.Save(); List <Band> testList = new List <Band> { testBand }; //Act List <Band> resultList = Band.GetAll(); //Assert Assert.Equal(testList, resultList); }
public void Test_SaveAssignsIdToObject() { //Arrange Band firstBand = new Band("Cameo"); firstBand.Save(); //Act Band savedBand = Band.GetAll()[0]; int result = savedBand.GetId(); int testId = firstBand.GetId(); //Assert Assert.Equal(testId, result); }
public void Test_Update_UpdatesBandInDatabase() { Band testBand = new Band("Some Band Name", "Some Band Description"); testBand.Save(); string newName = "nano.RIPE"; string newDescription = "A Japanese pop rock band with two core members."; testBand.Update(newName, newDescription); Band result = Band.GetAll()[0]; Band expected = new Band(newName, newDescription, testBand.Id); Assert.Equal(expected, result); }