public async Task GetSolutionTagAsync_ValidParameters_ExpectedResult() { IUKFastECloudClient client = Substitute.For <IUKFastECloudClient>(); client.GetAsync <Tag>("/ecloud/v1/solutions/123/tags/testkey").Returns(new Tag() { Value = "testvalue" }); var ops = new SolutionTagOperations <Tag>(client); var tag = await ops.GetSolutionTagAsync(123, "testkey"); Assert.AreEqual("testvalue", tag.Value); }
public async Task GetSolutionTagAsync_InvalidTagKey_ThrowsUKFastClientValidationException() { var ops = new SolutionTagOperations <Tag>(null); await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() => ops.GetSolutionTagAsync(123, "")); }