Пример #1
0
        public void CargoCollectTest()
        {
            Cargo c = new StandartCargo();

            ushort wei  = robot.Load;
            int    cost = robot.Cost;

            c.Collect(robot);

            Assert.IsTrue(wei <= robot.Load && cost <= robot.Cost);
        }
Пример #2
0
        public void RobotCollectTest()
        {
            Cargo  cargo1 = new StandartCargo();
            Cargo  cargo2 = new StandartCargo();
            ushort weight = robot.Load;
            int    cost   = robot.Cost;

            ushort w1 = cargo1.Weight;
            ushort w2 = cargo2.Weight;

            ushort c1 = cargo1.Cost;
            ushort c2 = cargo2.Cost;

            robot.Collect(cargo1);
            robot.Collect(cargo2);

            Assert.IsTrue((robot.Load == (weight + w1 + w2)) && (robot.Cost == (cost + c1 + c2)));
        }