Exemplo n.º 1
0
        public void GetRecordingState_Return200Ok(string sampleRecordingId)
        {
            ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyRecordingStateResponse);

            CallRecordingProperties result = serverCall.GetRecordingState(sampleRecordingId);

            Assert.AreEqual(CallRecordingState.Active, result.RecordingState);
        }
Exemplo n.º 2
0
        protected async Task ValidateCallRecordingStateAsync(ServerCall serverCall,
                                                             string recordingId,
                                                             CallRecordingState expectedCallRecordingState)
        {
            Assert.NotNull(serverCall);
            Assert.NotNull(recordingId);

            // There is a delay between the action and when the state is available.
            // Waiting to make sure we get the updated state, when we are running
            // against a live service.
            SleepInTest(6000);

            CallRecordingProperties callRecordingProperties = await serverCall.GetRecordingStateAsync(recordingId).ConfigureAwait(false);

            Assert.NotNull(callRecordingProperties);
            Assert.AreEqual(callRecordingProperties.RecordingState, expectedCallRecordingState);
        }