public void GetInputRegisterTest() { UInt16 index = 10; MemoryMap map = new MemoryMap(); map.AddInputRegister(new Register(index) { Value = 100 }); map.SetInputRegister(index, 100); UInt16 result = map.GetInputRegister(index); Assert.AreEqual(result, 100); }
public void SetInputRegisterTest() { UInt16 index = 0; UInt16 address = 1; MemoryMap map = new MemoryMap(); map.AddInputRegister(new Register(address) { Value = 100 }); map.SetInputRegister(address, 100); UInt16 result = map.InputRegisters[index].Value; Assert.AreEqual(result, 100); }