public void TestEditCenterShouldNotEditWhenFieldIsEmpty() { CenterInputModel centerModel = this.GetInputModel(); ICenterService centerService = new CenterService(this.dbContext); Center currentlyAdded = centerService.CreateCenter(centerModel); centerModel.Name = ""; centerModel.Id = currentlyAdded.Id; Center result = centerService.EditCenter(centerModel); Assert.True(result.Name == "SecondCenter"); }
public void TestEditCenterCorrectly() { CenterInputModel centerModel = this.GetInputModel(); ICenterService centerService = new CenterService(this.dbContext); Center currentlyAdded = centerService.CreateCenter(centerModel); centerModel.Name = "NameEdited"; centerModel.Id = currentlyAdded.Id; Center result = centerService.EditCenter(centerModel); Assert.True(result.Name == "NameEdited"); }