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()); }
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()); }
public void TestCheckDischargeGateIsOpen() { bool gateIsOpen = _plc.CheckDischargeGateIsOpen(); Assert.IsFalse(gateIsOpen); }