public virtual void TestReadWrite() { MockWriteContext writeContext = new MockWriteContext(Db()); ulong expected = 0x1122334455667788; ULongHandler().Write(writeContext, expected); MockReadContext readContext = new MockReadContext(writeContext); ulong ulongValue = (ulong)ULongHandler().Read(readContext); Assert.AreEqual(expected, ulongValue); }
public virtual void TestReadWrite() { MockWriteContext writeContext = new MockWriteContext(Db()); decimal expected = Decimal.MaxValue; DecimalHandler().Write(writeContext, expected); MockReadContext readContext = new MockReadContext(writeContext); decimal decimalValue = (decimal)DecimalHandler().Read(readContext); Assert.AreEqual(expected, decimalValue); }
public virtual void TestReadWrite() { MockWriteContext writeContext = new MockWriteContext(Db()); sbyte expected = 0x11; SByteHandler().Write(writeContext, expected); MockReadContext readContext = new MockReadContext(writeContext); sbyte sbyteValue = (sbyte)SByteHandler().Read(readContext); Assert.AreEqual(expected, sbyteValue); }
public virtual void TestReadWrite() { var writeContext = new MockWriteContext(Db()); uint expected = 0x11223344; UIntHandler().Write(writeContext, expected); var readContext = new MockReadContext(writeContext); var uintValue = (uint)UIntHandler().Read(readContext); Assert.AreEqual(expected, uintValue); }
public virtual void TestReadWrite() { var writeContext = new MockWriteContext(Db()); ushort expected = 0x1122; UShortHandler().Write(writeContext, expected); var readContext = new MockReadContext(writeContext); var ushortValue = (ushort)UShortHandler().Read(readContext); Assert.AreEqual(expected, ushortValue); }
public virtual void TestReadWrite() { MockWriteContext writeContext = new MockWriteContext(Db()); DateTime expected = new DateTime(); DateTimeHandler().Write(writeContext, expected); MockReadContext readContext = new MockReadContext(writeContext); DateTime actual = (DateTime)DateTimeHandler().Read(readContext); Assert.AreEqual(expected, actual); }