public void CreateLayout_WhenLayoutNameExists_ShouldReturnValidationException() { var layout = new LayoutDto { Description = "Description", LayoutName = "1 layout name", VenueId = 1 }; var exception = Assert.Throws <ValidationException>(() => _venueService.CreateLayout(layout)); Assert.AreEqual("Layout can't be created for this name", exception.Message); }
public void CreateLayout_WhenLayoutNameExists_ShouldReturnValidationException() { using (var scope = new TransactionScope()) { var layout = new LayoutDto { Description = "Description", LayoutName = "1 layout name", VenueId = 1 }; Assert.Throws <ValidationException>(() => _venueService.CreateLayout(layout)); } }