Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }