Beispiel #1
0
        public void DeleteDataRecordNotFoundTest()
        {
            var provider   = new ProviderMock();
            var repository = new RepositoryMock(provider);

            var result = repository.DeleteData(new TesteEntity());

            Assert.Single(result.Where(i => i.MessageType == "RecordNotFoundException"));
        }
Beispiel #2
0
        public void DeleteDataTest()
        {
            var provider   = new ProviderMock();
            var repository = new RepositoryMock(provider);
            var record     = new TesteEntity()
            {
                LastChangeDate = DateTime.UtcNow, RegisterDate = DateTime.UtcNow, Id = Guid.NewGuid(), Status = RecordStatus.Active
            };

            repository.AppenData(record);
            var result = repository.DeleteData(record);

            Assert.Single(result.Where(i => i.MessageType == "DeltedRecord"));
        }