Exemple #1
0
        public void Get_Success_ReturnEntity()
        {
            // Arrange
            var repository = new ReceiptProductRepository();
            var input      = repository.Create(GenerateInput());

            // Act
            var result = repository.Get(input.Id);

            // Assert
            Assert.IsInstanceOf <ReceiptProduct>(result);
        }
Exemple #2
0
        public void Delete_Success_ReturnNull()
        {
            // Arrange
            var repository = new ReceiptProductRepository();
            var input      = repository.Create(GenerateInput());

            // Act
            repository.Delete(input.Id);
            var result = repository.Get(input.Id);

            // Assert
            Assert.IsNull(result);
        }