public async void Should_delete_a_partition() { // Arrange const string partitionName = "DeletePartitionAsync"; var entity1 = new SomeTestEntity { PartitionKey = partitionName, RowKey = "MyKey1" }; var entity2 = new SomeTestEntity { PartitionKey = partitionName, RowKey = "MyKey2" }; await RepositoryUnderTest.InsertOrReplaceAsync(entity1); await RepositoryUnderTest.InsertOrReplaceAsync(entity2); // Act var result = await RepositoryUnderTest.DeletePartitionAsync(partitionName); // Assert Assert.NotNull(result); Assert.Equal(2, result.Count()); var dbResult = await RepositoryUnderTest.ReadPartitionAsync(partitionName); Assert.NotNull(dbResult); Assert.Equal(0, dbResult.Count()); }
public async void Should_return_an_enumerable() { // Arrange const string partitionName = "ReadPartitionAsync"; await RepositoryUnderTest.InsertOrReplaceAsync(new SomeTestEntity { PartitionKey = partitionName, RowKey = "Key1" }); await RepositoryUnderTest.InsertOrReplaceAsync(new SomeTestEntity { PartitionKey = partitionName, RowKey = "Key2" }); // Act var result = await RepositoryUnderTest.ReadPartitionAsync(partitionName); // Assert Assert.NotNull(result); Assert.Equal(2, result.Count()); }