public void ShouldThrowExceptionOnEmptyListDelete() { var exception = Assert.Throws <ReadOnlyException>(() => _repository.Delete(new List <TestModel>())); Assert.Equal("We're not allowing writes to a read-only repository", exception.Message); }
public void ShouldThrowExceptionOnDelete() { var exception = Assert.Throws <ReadOnlyException>(() => _repository.Delete(new TestModel())); Assert.Equal($"We're not allowing writes to a read-only repository: {nameof(TestModel)}", exception.Message); }