Exemplo n.º 1
0
 public async Task StartSolutionFailoverPlanAsync_InvalidFailoverPlanID_ThrowsUKFastClientValidationException()
 {
     var req = new StartFailoverPlanRequest();
     var ops = new FailoverPlanOperations <FailoverPlan>(null);
     await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() =>
                                                                         ops.StartSolutionFailoverPlanAsync("00000000-0000-0000-0000-000000000000", "", req));
 }
Exemplo n.º 2
0
        public async Task StartSolutionFailoverPlanAsync_ValidParameters_ExpectedClientCall()
        {
            IUKFastDRaaSClient client = Substitute.For <IUKFastDRaaSClient>();
            var req = new StartFailoverPlanRequest();

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

            await client.Received()
            .PostAsync($"/draas/v1/solutions/00000000-0000-0000-0000-000000000000/failover-plans/11111111-1111-1111-1111-111111111111/start", req);
        }