Exemple #1
0
        public void TestOrder(string args)
        {
            TestServer server = new TestServer(base.RemoteTestEndpoint);
            CmdSerializer <InParamModel> cmdHelper = new CmdSerializer <InParamModel>(args.Split(' '));
            InParamModel inParam = cmdHelper.AddMatchedGroups().ToModel();

            server.Work();
            while (!server.IsWork)
            {
                ;
            }
            OutParamModel outParam = this._client.Order(inParam);

            Assert.IsTrue(outParam.Raw.IndexOf(inParam.Domain) > 0 && outParam.Raw.IndexOf(inParam.Address) > 0 && outParam.Raw.IndexOf("0000-00-00(00:00:00:00)") > 0);
        }
Exemple #2
0
        private static void Input(string[] args)
        {
            CmdSerializer <InParamModel> cmdSerializer = new CmdSerializer <InParamModel>(args);

            InParam = cmdSerializer.AddMatchedGroups().ToModel();

            Config.Log(LogTypes.Input,
                       $"[role:{InParam.Role}] " +
                       $"[operation:{InParam.Operation}] " +
                       $"[domain:{InParam.Domain}] " +
                       $"[address:{InParam.Address}]");
            if (InParam == null)
            {
                throw new Exception("arg error.");
            }
        }