public void RobotPartSupplierDeliversRobotParts()
        {
            var mechSupplier = Build.RobotPartSupplier.With(new List <RobotPart>
            {
                new MockedRobotPart(),
                new MockedRobotPart()
            });

            var deliveryBay = new MockedDeliveryBay();

            mechSupplier.DeliverRobotParts(deliveryBay);

            Assert.AreEqual(2, deliveryBay.CountReceivedRobotParts());
            Assert.AreEqual(0, mechSupplier.CountDeliveredRobotParts());
        }
コード例 #2
0
        public void RobotPartSupplierDeliversRobotParts()
        {
            var mechSupplier = new RobotPartSupplier {
                RobotParts = new List <RobotPart> {
                    new MockedRobotPart(RobotPartCategory.Assembly),
                    new MockedRobotPart(RobotPartCategory.Assembly)
                }
            };

            var deliveryBay = new MockedDeliveryBay();

            mechSupplier.DeliverRobotParts(deliveryBay);

            Assert.AreEqual(2, deliveryBay.RobotParts.Count);
            Assert.AreEqual(0, mechSupplier.RobotParts.Count);
        }