public void Update_With_Correct_Layout() { //Arrange var layoutDTO = new LayoutDTO { Name = "test", Description = "test", VenueId = 1 }; //Act service.Create(layoutDTO); var layoutDTOForUpdate = new LayoutDTO { Id = 1, Name = "update", Description = "update", VenueId = 2 }; service.Update(layoutDTOForUpdate); //Assert Assert.AreEqual(service.GetById(1).Name, "update"); }
public void Update() { //Arrange var layoutDTO = new LayoutDTO() { Name = "test", Description = "test", VenueId = 1 }; var layoutForUpdate = new LayoutDTO() { Name = "update", Description = "update", VenueId = 1 }; service.Create(layoutDTO); layoutForUpdate.Id = service.GetByName("test").Id; //Act service.Update(layoutForUpdate); //Assert Assert.AreEqual(layoutForUpdate.Name, service.GetByName("update").Name); service.Delete(service.GetByName("update").Id); }