Пример #1
0
        public void RefetchCallHandlerData_EmptyHandler_Failure()
        {
            CallHandler oHandler = new CallHandler();
            var         res      = oHandler.RefetchCallHandlerData();

            Assert.IsFalse(res.Success, "Refetching data for an empty call handler should fail");
        }
Пример #2
0
        public void SetCallHandlerVoiceName_InvalidTargetPath_Failure()
        {
            //invalid target path
            var res = CallHandler.SetCallHandlerVoiceName(_mockServer, "aaa", "aaa");

            Assert.IsFalse(res.Success, "SetCallHandlerVoiceName did not fail with invalid target path");
        }
Пример #3
0
        public void SetCallHandlerVoiceName_EmptyObjectId_Failure()
        {
            const string strWavName = @"c:\";
            var          res        = CallHandler.SetCallHandlerVoiceName(_mockServer, strWavName, "");

            Assert.IsFalse(res.Success, "SetCallHandlerVoiceName did not fail with empty obejctID");
        }
Пример #4
0
        public void SetCallHandlerVoiceName_NullConnectionServer_Failure()
        {
            //invalid Connection server
            WebCallResult res = CallHandler.SetCallHandlerVoiceName(null, "", "");

            Assert.IsFalse(res.Success, "SetCallHandlerVoiceName did not fail with null Connection server passed.");
        }
Пример #5
0
        public void UpdateCallHandler_EmptyPropertyList_Failure()
        {
            ConnectionPropertyList oPropList = new ConnectionPropertyList();
            var res = CallHandler.UpdateCallHandler(_mockServer, "aaa", oPropList);

            Assert.IsFalse(res.Success, "UpdateCallHandler should fail if the property list is empty");
        }
Пример #6
0
        public void GetCallHandler_NullConnectionServer_Failure()
        {
            CallHandler oHandler;

            WebCallResult res = CallHandler.GetCallHandler(out oHandler, null);

            Assert.IsFalse(res.Success, "GetCallHandler should fail if the ConnectionServerRest is null");
        }
Пример #7
0
        public void GetCallHandlers_NullConnectionServer_Failure()
        {
            List <CallHandler> oHandlerList;

            WebCallResult res = CallHandler.GetCallHandlers(null, out oHandlerList, null);

            Assert.IsFalse(res.Success, "GetHandler should fail with null ConnectionServerRest passed to it");
        }
Пример #8
0
        public void GetCallHandlerVoiceName_EmptyObjectId_Failure()
        {
            const string strWavName = @"c:\";

            var res = CallHandler.GetCallHandlerVoiceName(_mockServer, "", strWavName);

            Assert.IsFalse(res.Success, "GetCallHandlerVoiceName did not fail with empty ObjectId passed");
        }
Пример #9
0
        public void UpdateCallHandler_EmptyObjectId_Failure()
        {
            ConnectionPropertyList oPropList = new ConnectionPropertyList();

            var res = CallHandler.UpdateCallHandler(_mockServer, "", oPropList);

            Assert.IsFalse(res.Success, "UpdateCallHandler should fail if the ObjectId parameter is blank");
        }
Пример #10
0
        public void UpdateCallHandler_NullConnectionServer_Failure()
        {
            ConnectionPropertyList oPropList = new ConnectionPropertyList();

            WebCallResult res = CallHandler.UpdateCallHandler(null, "", oPropList);

            Assert.IsFalse(res.Success, "UpdateCallHandler should fail if the ConnectionServerRest parameter is null");
        }
Пример #11
0
        public Task Invoke(IDictionary<string, object> environment)
        {
            var path = environment.Get<string>(OwinConstants.RequestPath);
            if (path == null || !PrefixMatcher.IsMatch(_path, path))
            {
                return _next(environment);
            }

            var dispatcher = new HubDispatcher(_configuration);

            var handler = new CallHandler(_configuration, dispatcher);
            return handler.Invoke(environment);
        }
Пример #12
0
 void _RemotingWrapper_CallEvent()
 {
     if (this.InvokeRequired)
     {
         CallHandler d = new CallHandler(_RemotingWrapper_CallEvent);
         this.Invoke(d, new object[] { });
     }
     else
     {
         if (progressBar1.Value == progressBar1.Maximum) return;
         progressBar1.Value++;
     }
 }
Пример #13
0
        public Task Invoke(IDictionary<string, object> environment)
        {
            var path = environment.Get<string>(OwinConstants.RequestPath);
            if (path == null || !path.StartsWith(_path, StringComparison.OrdinalIgnoreCase))
            {
                return _app.Invoke(environment);
            }

            var connectionFactory = new PersistentConnectionFactory(_resolver);
            var connection = connectionFactory.CreateInstance(_connectionType);

            var handler = new CallHandler(_resolver, connection);
            return handler.Invoke(environment);
        }
Пример #14
0
        public Task Invoke(IDictionary<string, object> environment)
        {
            var path = environment.Get<string>(OwinConstants.RequestPath);
            if (path == null || !PrefixMatcher.IsMatch(_path, path))
            {
                return _next(environment);
            }

            var connectionFactory = new PersistentConnectionFactory(_configuration.Resolver);
            var connection = connectionFactory.CreateInstance(_connectionType);

            var handler = new CallHandler(_configuration, connection);
            return handler.Invoke(environment);
        }
Пример #15
0
        public Task Invoke(IDictionary<string, object> environment)
        {
            var path = environment.Get<string>(OwinConstants.RequestPath);
            if (path == null || !path.StartsWith(_path, StringComparison.OrdinalIgnoreCase))
            {
                return _next(environment);
            }

            var pathBase = environment.Get<string>(OwinConstants.RequestPathBase);
            var dispatcher = new HubDispatcher(pathBase + _path, _enableJavaScriptProxies);

            var handler = new CallHandler(_resolver, dispatcher);
            return handler.Invoke(environment);
        }