/// <summary> /// Shoulds the get message model from mq. /// </summary> // [Fact] public void ShouldGetMessageModelFromMQ() { //assume var activemq = new ActiveMQAdapter <PushMessageModel>(mq_Ip_address, QUEUE_DESTINATION); //act var msglist = activemq.ReceviceMessage <PushMessageModel>(); //assert Assert.NotNull(msglist); Assert.True(msglist.Count() > 0); }
/// <summary> /// Shoulds the send message model to mq and get them. /// </summary> //[Fact] public void ShouldSendMessageModelToMQAndGetThem() { //assume var activemq = new ActiveMQAdapter <PushMessageModel>(mq_Ip_address, QUEUE_DESTINATION); var msg = CreateNewTestMessage(); //act activemq.SendMessage <PushMessageModel>(msg); Thread.Sleep(1000); var msglist = activemq.ReceviceMessage <PushMessageModel>(); //assert Assert.NotNull(msglist); Assert.Equal(1, msglist.Length); }