Ejemplo n.º 1
0
        public void TestCheckMainTankIsEmpty()
        {
            bool tankIsEmpty;

            tankIsEmpty = _plc.CheckMainTankIsEmpty();

            Assert.IsFalse(tankIsEmpty);
        }
Ejemplo n.º 2
0
        public void TestMakeBatchFillTank()
        {
            PLCController plc = new PLCController("PLCEmptyTankDoorClosed.txt");

            BatchController.MakeBatchFillFirstTank(plc);

            Assert.IsFalse(plc.CheckMainTankIsEmpty());
            Assert.IsFalse(plc.CheckLargeValveIsOpen());
        }
Ejemplo n.º 3
0
        public void TestMakeBatchUseSmallValve()
        {
            PLCController plc = new PLCController("PLCFullTank1.txt");

            BatchController.MakeBatchFillSecondTank(plc);

            Assert.IsFalse(plc.CheckMainTankIsEmpty());
            Assert.IsFalse(plc.CheckSmallValveIsOpen());
        }
Ejemplo n.º 4
0
        public void TestMakeBatchWaitForFinish()
        {
            PLCController plc      = new PLCController("PLCFullTankMixStarted.txt");
            Batch         newBatch = BatchController.MakeBatch_EmptyTank(plc, _type4);

            BatchController.MakeBatchWaitForFinish(plc, newBatch);

            Assert.IsFalse(plc.CheckMotorIsOn());
            Assert.IsFalse(plc.CheckFurnaceIsOn());
            Assert.IsTrue(plc.CheckMainTankIsEmpty());
            Assert.IsFalse(plc.CheckDischargeGateIsOpen());
            Assert.IsFalse(plc.CheckIsFinishedAcknowledged());
        }
Ejemplo n.º 5
0
        public void TestMakeBatchEmptyTank()
        {
            Machine       mac = MachineController.InitializeMachine();
            Batch         newBatchFromEmpty;
            Batch         newBatchFromFull;
            PLCController plcFullTank  = new PLCController("PLCFullTank.txt");
            PLCController plcEmptyTank = new PLCController("PLCEmptyTank.txt");

            newBatchFromFull  = BatchController.MakeBatch_EmptyTank(plcFullTank, _type4);
            newBatchFromEmpty = BatchController.MakeBatch_EmptyTank(plcEmptyTank, _type4);

            Assert.AreEqual(mac.ID, newBatchFromEmpty.MachineID);
            Assert.AreEqual(mac.ID, newBatchFromFull.MachineID);

            Assert.IsTrue(plcFullTank.CheckMainTankIsEmpty());
            Assert.IsFalse(plcFullTank.CheckDischargeGateIsOpen());
            Assert.IsTrue(plcEmptyTank.CheckMainTankIsEmpty());
            Assert.IsFalse(plcEmptyTank.CheckDischargeGateIsOpen());
        }