Esempio n. 1
0
        public async Task SaveAsync_TableStorageReturnsBadRequest_ThrowsInvalidOperationException()
        {
            // Inserting the same row twice in the same EGT causes Table Storage to return 400 Bad Request.
            _tableStorageProvider.Add(_tableName, new DecoratedItem {
                Id = "123", Name = "abc"
            });
            _tableStorageProvider.Add(_tableName, new DecoratedItem {
                Id = "123", Name = "abc"
            });

            await AsyncAssert.ThrowsAsync <InvalidOperationException>(() => _tableStorageProvider.SaveAsync(Execute.Atomically));
        }
Esempio n. 2
0
 public async Task GetAsync_ObjectDoesNotExist_ThrowsEntityDoesNotExistException()
 {
     await AsyncAssert.ThrowsAsync <EntityDoesNotExistException>(() => _tableStorageProvider.GetAsync(_tableName, "not", "found"));
 }