예제 #1
0
 private static void AssertReadOnly(IIonInt ionInt)
 {
     Assert.IsTrue(ionInt.ReadOnly);
     Assert.ThrowsException <ReadOnlyException>(() => ionInt.IntValue        = int.MaxValue / 4);
     Assert.ThrowsException <ReadOnlyException>(() => ionInt.LongValue       = long.MaxValue / 4);
     Assert.ThrowsException <ReadOnlyException>(() => ionInt.BigIntegerValue = new BigInteger(long.MaxValue));
 }
예제 #2
0
 private static void AssertNull(IIonInt ionValue)
 {
     Assert.IsTrue(ionValue.IsNull);
     Assert.ThrowsException <NullValueException>(() => ionValue.IntValue);
     Assert.ThrowsException <NullValueException>(() => ionValue.LongValue);
     Assert.ThrowsException <NullValueException>(() => ionValue.BigIntegerValue);
 }