Beispiel #1
0
        public void dispatcher_publish_test()
        {
            var _dispatcher = new DispatcherFake();

            _dispatcher.publish(new Event("100"));

            var len = _dispatcher.QueueLength();

            Assert.AreEqual(len, 1);
        }
Beispiel #2
0
        public void dispatcher_publish_serverName_exception_test()
        {
            var _dispatcher = new DispatcherFake();

            try {
                _dispatcher.publish(null);

                Assert.Fail();
            } catch (Exception excep) {
                Assert.IsTrue(excep.Message.Contains("event"));
            }
        }