Esempio n. 1
0
        public void Setup()
        {
            _mapping    = new HandlerMapping(typeof(SmallMessageHandler));
            _serializer = UdpMessagePackSerializer.Instance;
            var _dgram = UdpMessage.Create(new SmallMessage(10), _serializer).ToDgram(_serializer);

            _handler     = new SmallMessageHandler();
            _handlerInfo = new HandlerInfo(_dgram, null, null);
        }
Esempio n. 2
0
        public void BigSmall_NullMessage_Exception()
        {
            var smallHandler = new SmallMessageHandler(10);
            var bigHandler   = new BigMessageHandler(15, smallHandler);

            Action handling = () => bigHandler.Handle(null);

            var exc = handling.Should().Throw <Exception>().Which;

            _output.WriteLine(exc.Message);
        }