Exemple #1
0
        public async Task StopSolutionFailoverPlanAsync_ValidParameters_ExpectedClientCall()
        {
            IUKFastDRaaSClient client = Substitute.For <IUKFastDRaaSClient>();

            var ops = new FailoverPlanOperations <FailoverPlan>(client);
            await ops.StopSolutionFailoverPlanAsync("00000000-0000-0000-0000-000000000000", "11111111-1111-1111-1111-111111111111");

            await client.Received()
            .PostAsync($"/draas/v1/solutions/00000000-0000-0000-0000-000000000000/failover-plans/11111111-1111-1111-1111-111111111111/stop");
        }
Exemple #2
0
 public async Task StopSolutionFailoverPlanAsync_InvalidFailoverPlanID_ThrowsUKFastClientValidationException()
 {
     var ops = new FailoverPlanOperations <FailoverPlan>(null);
     await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() =>
                                                                         ops.StopSolutionFailoverPlanAsync("00000000-0000-0000-0000-000000000000", ""));
 }