Пример #1
0
        public void RegisterSNEventTest5()
        {
            ISNEvent testInsintace = new SNEvent();
            ISNEvent e             = null;

            SNFramework.Action <string, int, int, int, int> voidAc5 = (string s, int i, int p3, int p4, int p5) => {
            };
            e = testInsintace.Register(SNMsg.ExampleMsg, voidAc5);
            Assert.IsNotNull(e);
        }
Пример #2
0
        public void SendSNEventTest5()
        {
            ISNEvent testInsintace = new SNEvent();
            string   str           = "";
            int      param         = 0;
            int      param2        = 0;
            int      param3        = 0;
            int      param4        = 0;

            SNFramework.Action <string, int, int, int, int> voidAc5 = (string s, int i, int p3, int p4, int p5) => {
                str    = "1";
                param  = 1;
                param2 = 1;
                param3 = 1;
                param4 = 1;
            };
            testInsintace.Register(SNMsg.ExampleMsg, voidAc5);
            testInsintace.Dispatch(SNMsg.ExampleMsg, "1", 1, 1, 1, 1);
            Assert.AreEqual(param, 1);
            Assert.AreEqual(str, "1");
            Assert.AreEqual(param2, 1);
            Assert.AreEqual(param3, 1);
            Assert.AreEqual(param4, 1);
        }