Example #1
0
        public async Task WhenWeAskToAdd_ShouldBeAskedToStoreInCosmosDB()
        {
            var newEntity = DomainGenerator.InvoiceGenerator().Generate();

            var updatedEntity = await _sut.AddAsync(newEntity);

            await _genericRepo.Received().CreateAsync(Arg.Any <Invoice>());
        }
        public async Task WhenWeAskToAddACustomer_ShouldBeAskedToStoreInCosmosDB()
        {
            var newCustomer = DomainGenerator.CustomerGenerator().Generate();

            var updatedCustomer = await _sut.AddAsync(newCustomer);

            await _genericRepo.Received().CreateAsync(Arg.Any <Customer>());
        }