コード例 #1
0
        public void Pua_ShouldPassTheBaggage_ToBagCollector()
        {
            var timerServiceMock = new Mock <ITimerService>();
            var bagCollectorMock = new Mock <IChainLink>();

            bagCollectorMock.Setup(cl => cl.Destination).Returns(typeof(BagCollector).Name);
            var bagMock = new Mock <Baggage>();

            var pua = new PickUpArea(1, Guid.NewGuid().ToString(), timerServiceMock.Object);

            pua.AddSuccessor(bagCollectorMock.Object);

            pua.PassBaggage(bagMock.Object);

            bagMock.Object.Destination.ShouldBe(typeof(BagCollector).Name);
        }