예제 #1
0
        public void AgentCommandTest1()
        {
            CType test = new CType(1);

            System.Reflection.MethodInfo      method       = typeof(IType).GetMethod(nameof(IType.TestMethod1));
            Remote.Client.MethodStringInvoker invoker      = new Remote.Client.MethodStringInvoker(test, method, new Remote.Client.TypeConverterSet());
            Remote.Client.AgentCommand        agentCommand = new Regulus.Remote.Client.AgentCommand(new Remote.Client.AgentCommandVersionProvider(), typeof(IType), invoker);
            Assert.Equal("IType-0.TestMethod1 [a1,a2,a3]", agentCommand.Name);
        }
예제 #2
0
        public void MethodStringInvokerTest1()
        {
            CType test = new CType(1);

            System.Reflection.MethodInfo      method  = typeof(IType).GetMethod(nameof(IType.TestMethod1));
            Remote.Client.MethodStringInvoker invoker = new Remote.Client.MethodStringInvoker(test, method, new Remote.Client.TypeConverterSet());
            invoker.Invoke("1", "2", "3");

            Assert.Equal(true, test.TestMethod1Invoked);
        }