public static void TestValidValuesFromInt(Int32 value) { TestHelpers.CatchUnexpected(() => { Int24 val = Int24.GetNew(value); Assert.AreEqual(value, val.Value, string.Format("On Set with Int32:{0}", value)); }); }
public static void TestOutOfRange(Int32 value) { TestHelpers.CatchUnexpected(() => { Assert.Throws <ArgumentOutOfRangeException>(() => { Int24 val = Int24.GetNew(value); }); }); }
public static void TestValidValuesFromBytes(Int32 value) { TestHelpers.CatchUnexpected(() => { byte[] buffer = Int24.GetBytes(value); int pos = 0; Int24 val = Int24.GetNew(buffer, ref pos); Assert.AreEqual(value, val.Value, string.Format("On Set with Int32:{0}", buffer.ToHexByteString())); }); }