public void Setup() { Lines = new List <ShippedLine>(); Lines.Add(new ShippedLine() { LineNumber = "line1" }); Lines.Add(new ShippedLine() { LineNumber = "line2" }); Lines.Add(new ShippedLine() { LineNumber = "line3" }); DefaultOrderHasBeenShippedMessage = new OrderHasBeenShippedMessage() { BOL = BOL, ControlNumber = ControlNumber, Lines = Lines }; var mock = new Mock <IMessagePublisher>(); mock.Setup(bus => bus.Publish(It.Is <EdiAsnSentMessage>(msg => AssertEdiAsnSentMessageValues(msg)))); _sut = new PublishEdiAsnSentSpecification(mock.Object); }
public void Setup() { Lines = new List<ShippedLine>(); Lines.Add(new ShippedLine(){LineNumber = "line1"}); Lines.Add(new ShippedLine(){LineNumber = "line2"}); Lines.Add(new ShippedLine(){LineNumber = "line3"}); DefaultOrderHasBeenShippedMessage = new OrderHasBeenShippedMessage() { BOL = BOL, ControlNumber = ControlNumber, Lines = Lines }; var mock = new Mock<IMessagePublisher>(); mock.Setup(bus => bus.Publish(It.Is<EdiAsnSentMessage>(msg => AssertEdiAsnSentMessageValues(msg)))); _sut = new PublishEdiAsnSentSpecification(mock.Object); }