コード例 #1
0
        public async Task PauseRecordingAsync_Return200Ok(string sampleRecordingId)
        {
            ServerCall serverCall = CreateMockServerCall(200);

            Response response = await serverCall.PauseRecordingAsync(sampleRecordingId);

            Assert.AreEqual((int)HttpStatusCode.OK, response.Status);
        }
コード例 #2
0
        public void PauseRecordingAsync_Returns404NotFound(string sampleRecordingId)
        {
            ServerCall serverCall = CreateMockServerCall(404);

            RequestFailedException?ex = Assert.ThrowsAsync <RequestFailedException>(async() => await serverCall.PauseRecordingAsync(sampleRecordingId).ConfigureAwait(false));

            Assert.NotNull(ex);
            Assert.AreEqual(ex?.Status, 404);
        }