public void TestOnMessageWithNullMessageThrowsException() { var listener = new GojulMQFailedMessageListener <object>(new Mock <IGojulMQMessageProducer <object> >().Object, ListenMessage, "hello"); Assert.Throws <ArgumentNullException>(() => listener.OnMessage(null)); }
public void TestOnMessage() { Mock <IGojulMQMessageProducer <object> > producer = new Mock <IGojulMQMessageProducer <object> >(); var listener = new GojulMQFailedMessageListener <object>(producer.Object, ListenMessage, "hello"); listener.OnMessage("world"); Assert.True(consumed); }