public void CheckReadCommand2Test() { MountSimulatorPlcCommunication privateTarget = MountSimulatorPlcCommunication.Create(); MountSimulatorPlcCommunication_Accessor target = new MountSimulatorPlcCommunication_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(MountSimulatorPlcCommunication)))); Assert.AreEqual<bool>(true, target.CheckForErrorReadCommand("\u000500FFCR0001502811", out errorCode)); Assert.AreEqual<int>(-1, errorCode); }
public void CheckWriteCommand3Test() { MountSimulatorPlcCommunication privateTarget = MountSimulatorPlcCommunication.Create(); MountSimulatorPlcCommunication_Accessor target = new MountSimulatorPlcCommunication_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(MountSimulatorPlcCommunication)))); Assert.AreEqual<bool>(false, target.CheckForErrorWriteCommand("\u000500FFCW0001FF01555508", out errorCode)); Assert.AreEqual<int>(0x6, errorCode); }
public void InitializeMemory1Test() { MountSimulatorPlcCommunication privateTarget = MountSimulatorPlcCommunication.Create(); MountSimulatorPlcCommunication_Accessor target = new MountSimulatorPlcCommunication_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(MountSimulatorPlcCommunication)))); // default new lot start line Assert.AreEqual<ushort>(3, target._memory._memory[0x12E]); // default machine state Assert.AreEqual<ushort>(2, target._memory._memory[0x140]); // default wafer quantity Assert.AreEqual<ushort>(3, target._memory._memory[0x18F]); Assert.AreEqual<ushort>(3, target._memory._memory[0x191]); Assert.AreEqual<bool>(true, SimulatorHelper.CheckValuesInArray(target._memory._memory, 0x120, 0x12D, 0)); Assert.AreEqual<bool>(true, SimulatorHelper.CheckValuesInArray(target._memory._memory, 0x12F, 0x137, 0)); Assert.AreEqual<bool>(true, SimulatorHelper.CheckValuesInArray(target._memory._memory, 0x141, 0x141, 0)); Assert.AreEqual<bool>(true, SimulatorHelper.CheckValuesInArray(target._memory._memory, 0x150, 0x18E, 0)); Assert.AreEqual<bool>(true, SimulatorHelper.CheckValuesInArray(target._memory._memory, 0x190, 0x190, 0)); Assert.AreEqual<bool>(true, SimulatorHelper.CheckValuesInArray(target._memory._memory, 0x200, 0x457, 0)); }