Ejemplo n.º 1
0
        public Client(int id, Config cfg, SynchronizationContext ctx)
        {
            ClientStatisticsGatherer = new ClientStatisticsGatherer();

              _ctx = ctx;
              _id = id;

              Data = new TestData(this);
              IsStopped = false;

              _log = LogManager.GetLogger("Client_" + _id);
              _log.Debug("Client created");

              Configure(cfg);

              if (String.IsNullOrEmpty(_login))
              {
            const string err = "Login command is not specified!!! Can't do any test.";
            _log.Error(err);

            throw new Exception(err);
              }

              _ajaxHelper = new AjaxHelper(new AjaxConn(_login, cfg.ServerIp, cfg.AjaxPort, _ctx));
              _webSock = new WebSockConn(_login, cfg.ServerIp, cfg.WsPort, ctx);

              _webSock.CcsStateChanged += WsOnCcsStateChanged;
              _webSock.InitializationFinished += () => _testMng.GetTest<LoginTest>().OnClientInitialized();
              _testMng.SetEnv(_login, _ajaxHelper.AjaxConn, _webSock);
        }
Ejemplo n.º 2
0
 public WaitCall(Condition callCommitCondition, int commitPause, bool acceptCalls, bool rejectCalls, bool noAnswer, TestData data)
 {
     _commitCondition = callCommitCondition;
       _commitAfter = commitPause > 0 ? commitPause : 1;
       _acceptCalls = acceptCalls;
       _rejectCalls = rejectCalls;
       _noAnswer = noAnswer;
       _data = data;
 }