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); }
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); }