Exemplo n.º 1
0
        public async Task StartPreviewSnapshot_ReturnsSuccess()
        {
            requestsAndResponses.Add(ApiUris.StartPreviewSnapshot(accountId), RequestFileResponseType.AsGoodResponse("StartPreviewSnapshotResponse.xml"));

            var startPreviewSnapshotType = new StartPreviewSnapshotType();

            startPreviewSnapshotType.consistencyGroupId = "3389ffe8-c3fc-11e3-b29c-001517c4643e";

            var client   = GetWebApiClient();
            var accessor = new ConsistencyGroupAccessor(client);
            var response = await accessor.StartPreviewSnapshot(startPreviewSnapshotType);

            Assert.IsNotNull(response);
            Assert.AreEqual("START_PREVIEW_SNAPSHOT", response.operation);
        }
 /// <summary>
 /// Start preview snapshot of a consistency group.
 /// </summary>
 /// <param name="startPreviewSnapshotType">The start preview snapshot type.</param>
 /// <returns>The <see cref="ResponseType"/></returns>
 public async Task <ResponseType> StartPreviewSnapshot(StartPreviewSnapshotType startPreviewSnapshotType)
 {
     return(await _apiClient.PostAsync <StartPreviewSnapshotType, ResponseType>(ApiUris.StartPreviewSnapshot(_apiClient.OrganizationId), startPreviewSnapshotType));
 }