public void Delete_ShouldThrowNotImplementedException() { // Arrange // Act Action act = () => { _target.Delete(null); }; // Assert Assert.ThrowsException <NotImplementedException>(act); }
public void Delete_ShouldThrowInvalidOperationException() { // Arrange var klant = new KlantBuilder().SetDummy().Create(); var dataMapper = new KlantDataMapper(_context); // Act void Act() { dataMapper.Delete(klant); } // Assert var exception = Assert.ThrowsException <InvalidOperationException>((Action)Act); Assert.AreEqual("Deleting klanten is not allowed", exception.Message); }