public void Test_ToBoolean_UseNbo() { var converter = new DefaultConverter(); bool theBool = true; var bytes = BitConverter.GetBytes(theBool).Reverse().ToArray(); var actual = converter.ToBoolean(bytes, 0, true); const bool expected = true; Assert.AreEqual(expected, actual); }
public void Test_ToBoolean() { var converter = new DefaultConverter(); bool theBool = true; var bytes = BitConverter.GetBytes(theBool); var actual = converter.ToBoolean(bytes, 0, false); const bool expected = true; Assert.AreEqual(expected, actual); }