示例#1
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());
        }
示例#2
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());
        }
示例#3
0
        public void TestCheckDischargeGateIsOpen()
        {
            bool gateIsOpen = _plc.CheckDischargeGateIsOpen();

            Assert.IsFalse(gateIsOpen);
        }