public void CheckWriteCommand3Test() { StockerSimulatorPlcCommunication privateTarget = StockerSimulatorPlcCommunication.Create(); StockerSimulatorPlcCommunication_Accessor target = new StockerSimulatorPlcCommunication_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(StockerSimulatorPlcCommunication)))); Assert.AreEqual<bool>(false, target.CheckForErrorWriteCommand("\u000500FFCW00013501ABCD1A", out errorCode)); Assert.AreEqual<int>(0x6, errorCode); }
public void CheckReadCommand2Test() { StockerSimulatorPlcCommunication privateTarget = StockerSimulatorPlcCommunication.Create(); StockerSimulatorPlcCommunication_Accessor target = new StockerSimulatorPlcCommunication_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(StockerSimulatorPlcCommunication)))); Assert.AreEqual<bool>(true, target.CheckForErrorReadCommand("\u000500FFCR0001201409", out errorCode)); Assert.AreEqual<int>(-1, errorCode); }
public void CheckWriteCommand1Test() { StockerSimulatorPlcCommunication privateTarget = StockerSimulatorPlcCommunication.Create(); StockerSimulatorPlcCommunication_Accessor target = new StockerSimulatorPlcCommunication_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(StockerSimulatorPlcCommunication)))); Assert.AreEqual<bool>(true, target.CheckForErrorWriteCommand("\u000500FFCW000120151111222233334444555566667777888899990000AAAABBBBCCCCDDDDEEEE7F", out errorCode)); Assert.AreEqual<int>(-1, errorCode); }
public void InitializeMemory1Test() { StockerSimulatorPlcCommunication privateTarget = StockerSimulatorPlcCommunication.Create(); StockerSimulatorPlcCommunication_Accessor target = new StockerSimulatorPlcCommunication_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(StockerSimulatorPlcCommunication)))); Assert.AreEqual<bool>(true, SimulatorHelper.CheckValuesInArray(target._memory._memory, 0x120, 0x134, 0)); }