Пример #1
0
        public void RecordStreamFile_ErrorResponse_Failure()
        {
            //error response
            _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), It.IsAny <MethodType>(), It.IsAny <ConnectionServerRest>(),
                                                        It.IsAny <Dictionary <string, string> >())).Returns(new WebCallResult
            {
                Success      = false,
                ResponseText = "error text",
                StatusCode   = 404
            });

            var res = _mockPhoneRecording.RecordStreamFile();

            Assert.IsFalse(res.Success, "PhoneRecording with error response from server should fail");
        }
Пример #2
0
        public void PlayMessageFile_RecordAndPlaybackStream_Success()
        {
            var res = _recording.RecordStreamFile();

            Assert.IsTrue(res.Success, "Recording of stream failed:" + res);

            res = _recording.PlayStreamFile();
            Assert.IsTrue(res.Success, "Failed to play recording stream back:" + res);

            Console.WriteLine(_recording.ToString());
        }