public async Task DeleteSolutionTagAsync_ValidParameters_ExpectedResult() { IUKFastECloudClient client = Substitute.For <IUKFastECloudClient>(); client.DeleteAsync <Tag>("/ecloud/v1/solutions/123/tags/testkey").Returns(new Tag() { Value = "testvalue" }); var ops = new SolutionTagOperations <Tag>(client); await ops.DeleteSolutionTagAsync(123, "testkey"); await client.Received().DeleteAsync("/ecloud/v1/solutions/123/tags/testkey"); }
public async Task DeleteSolutionTagAsync_InvalidTagKey_ThrowsUKFastClientValidationException() { var ops = new SolutionTagOperations <Tag>(null); await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() => ops.DeleteSolutionTagAsync(123, "")); }