public void ReadMemory3Test() { PlcMemory privateTarget = new PlcMemory(); PlcMemory_Accessor target = new PlcMemory_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(PlcMemory)))); target.WriteMemory(264, "0123456789ABCDEF"); Assert.AreEqual<string>("0123456789ABCDEF", target.ReadMemory(264, 4)); }
public void ReadMemory2Test() { PlcMemory privateTarget = new PlcMemory(); PlcMemory_Accessor target = new PlcMemory_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(PlcMemory)))); target.WriteMemory(3, "56ABABCD"); Assert.AreEqual<string>("56ABABCD", target.ReadMemory(3, 2)); }