Exemplo n.º 1
0
        public async Task ResetSolutionBackupServiceCredentialsAsync_ValidParameters_ExpectedClientCall()
        {
            IUKFastDRaaSClient client = Substitute.For <IUKFastDRaaSClient>();

            var req = new ResetBackupServiceCredentialsRequest()
            {
                Password = "******"
            };

            var ops        = new BackupServiceOperations <BackupService>(client);
            var solutionID = "00000000-0000-0000-0000-000000000000";
            await ops.ResetSolutionBackupServiceCredentialsAsync(solutionID, req);

            await client.Received()
            .PostAsync($"/draas/v1/solutions/{solutionID}/backup-service/reset-credentials", req);
        }
Exemplo n.º 2
0
 public async Task ResetSolutionBackupServiceCredentialsAsync_InvalidSolutionID_ThrowsUKFastClientValidationException()
 {
     var ops = new BackupServiceOperations <BackupService>(null);
     await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() =>
                                                                         ops.ResetSolutionBackupServiceCredentialsAsync("", null));
 }