Пример #1
0
        public async Task DeleteDAppOfferById()
        {
            //Arrange
            var product1 = new DAppOffer
            {
                Id          = Guid.NewGuid(),
                Title       = "Title1",
                Description = "Description1"
            };

            var product2 = new DAppOffer
            {
                Id          = Guid.NewGuid(),
                Title       = "Title2",
                Description = "Description2"
            };

            await _dAppRepository.CreateDAppOffer(product1);

            await _dAppRepository.CreateDAppOffer(product2);

            //Act
            await _dAppRepository.DeleteDAppOffer(product1.Id);

            var result = await _dAppRepository.GetDAppOffer(product1.Id);

            var resultAll = await _dAppRepository.GetAllDAppOffers();

            //Assert
            Assert.Null(result);
            Assert.NotNull(resultAll);
            Assert.NotEmpty(resultAll);
            Assert.Single(resultAll);
        }
Пример #2
0
 public async Task <DAppOffer> GetDAppOffer(Guid id)
 {
     return(await _dAppRepository.GetDAppOffer(id));
 }