public void TestCommandRegisterEvent3() { IDummy dummy = NSubstitute.Substitute.For <IDummy>(); Command command = new Command(); command.RegisterEvent += (cmd, ret, args) => { NUnit.Framework.Assert.AreEqual("m", cmd); NUnit.Framework.Assert.AreEqual(typeof(void), ret.Param); NUnit.Framework.Assert.AreEqual(typeof(int), args[0].Param); NUnit.Framework.Assert.AreEqual(typeof(int), args[1].Param); NUnit.Framework.Assert.AreEqual("", ret.Description); NUnit.Framework.Assert.AreEqual("l1", args[0].Description); NUnit.Framework.Assert.AreEqual("l2", args[1].Description); }; command.Register <int, int>("m [l1 ,l2]", (l1, l2) => { dummy.Method2(l1, l2); }); }