public async Task CanGetRepositoryProperties() { // Arrange var client = CreateClient(); var repository = client.GetRepository(_repositoryName); // Act ContainerRepositoryProperties properties = await repository.GetPropertiesAsync(); // Assert Assert.AreEqual(_repositoryName, properties.Name); }
public async Task CanSetRepositoryProperties() { // Arrange var client = CreateClient(); var repository = client.GetRepository(_repositoryName); ContainerRepositoryProperties repositoryProperties = await repository.GetPropertiesAsync(); ContainerRepositoryProperties originalProperties = repositoryProperties; // Act ContainerRepositoryProperties properties = await repository.UpdatePropertiesAsync( new ContainerRepositoryProperties() { CanList = false, CanRead = false, CanWrite = false, CanDelete = false, }); // Assert Assert.IsFalse(properties.CanList); Assert.IsFalse(properties.CanRead); Assert.IsFalse(properties.CanWrite); Assert.IsFalse(properties.CanDelete); ContainerRepositoryProperties updatedProperties = await repository.GetPropertiesAsync(); Assert.IsFalse(updatedProperties.CanList); Assert.IsFalse(updatedProperties.CanRead); Assert.IsFalse(updatedProperties.CanWrite); Assert.IsFalse(updatedProperties.CanDelete); // Cleanup await repository.UpdatePropertiesAsync(originalProperties); }