Пример #1
0
        public async Task StorageService_AddAddress()
        {
            var models   = new[] { new GoogleAddress() };
            var document = GetDocument <GoogleAddress>("mentorbot", "addresses");

            await _service.AddAddressesAsync(models);

            document.Received().AddManyAsync(models);
        }
        public async Task StorageService_AddAddress()
        {
            var models   = new[] { new GoogleAddress() };
            var document = Substitute.For <IDocument <GoogleAddress> >();

            _documentClientService.IsConnected.Returns(true);
            _documentClientService.Get <GoogleAddress>("mentorbot", "addresses").Returns(document);

            await _service.AddAddressesAsync(models);

            document.Received().AddManyAsync(models);
        }