Esempio n. 1
0
 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));
     });
 }
Esempio n. 2
0
 public static void TestOutOfRange(Int32 value)
 {
     TestHelpers.CatchUnexpected(() => {
         Assert.Throws <ArgumentOutOfRangeException>(() => {
             Int24 val = Int24.GetNew(value);
         });
     });
 }
Esempio n. 3
0
 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()));
     });
 }