public void GetDesignDocument_Exists_Success() { // Arrange var createResult = _bucketManager.InsertDesignDocument("test", JsonConvert.SerializeObject(DesignDoc)); Assert.True(createResult.Success); try { // Act var result = _bucketManager.GetDesignDocument("test"); // Assert Assert.NotNull(result); Assert.True(result.Success, "{0}-{1}", result.Message, result.Exception == null ? "" : result.Exception.ToString()); } finally { // Cleanup var removeResult = _bucketManager.RemoveDesignDocument("test"); Assert.True(removeResult.Success, "{0}-{1}", removeResult.Message, removeResult.Exception == null ? "" : removeResult.Exception.ToString()); } }
public void RemoveDesignDocument_Throws_NotSupportedException() { Assert.Throws <NotSupportedException>(() => _bucketManager.RemoveDesignDocument(It.IsAny <string>())); }