public async Task RenameSolutionTemplateAsync_ValidParameters_ExpectedResult() { IUKFastECloudClient client = Substitute.For <IUKFastECloudClient>(); var req = new RenameTemplateRequest() { Destination = "newtemplate" }; var ops = new SolutionTemplateOperations <Template>(client); await ops.RenameSolutionTemplateAsync(123, "testtemplate", req); await client.Received().PostAsync("/ecloud/v1/solutions/123/templates/testtemplate/move", req); }
public async Task RenameSolutionTemplateAsync_InvalidTemplateName_ThrowsUKFastClientValidationException() { var ops = new SolutionTemplateOperations <Template>(null); await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() => ops.RenameSolutionTemplateAsync(123, "", null)); }