public async Task GetSolutionBackupServiceAsync_ValidParameters_ExpectedResult() { IUKFastDRaaSClient client = Substitute.For <IUKFastDRaaSClient>(); client.GetAsync <BackupService>($"/draas/v1/solutions/00000000-0000-0000-0000-000000000000/backup-service").Returns(new BackupService() { AccountName = "Test" }); var ops = new BackupServiceOperations <BackupService>(client); var backupService = await ops.GetSolutionBackupServiceAsync("00000000-0000-0000-0000-000000000000"); Assert.AreEqual("Test", backupService.AccountName); }
public async Task GetSolutionBackupServiceAsync_InvalidSolutionID_ThrowsUKFastClientValidationException() { var ops = new BackupServiceOperations <BackupService>(null); await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() => ops.GetSolutionBackupServiceAsync("")); }