예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldThrowExceptionOnMultiplyOverflow()
        internal virtual void ShouldThrowExceptionOnMultiplyOverflow()
        {
            DurationValue duration = duration(0, 0, long.MaxValue, 0);

            assertThrows(typeof(InvalidValuesArgumentException), () => duration.Mul(Values.IntValue(2)));
            assertThrows(typeof(InvalidValuesArgumentException), () => duration.Mul(Values.FloatValue(2)));
        }
예제 #2
0
 private void InitializeInstanceFields()
 {
     _scalars = Arrays.asList(ShouldGivePublic(Values.ByteValue(( sbyte )1), ( sbyte )1), ShouldGivePublic(Values.ShortValue(( short )2), ( short )2), ShouldGivePublic(Values.IntValue(3), 3), ShouldGivePublic(Values.LongValue(4L), 4L), ShouldGivePublic(Values.FloatValue(5.0f), 5.0f), ShouldGivePublic(Values.DoubleValue(6.0), 6.0), ShouldGivePublic(Values.BooleanValue(false), false), ShouldGivePublic(Values.CharValue('a'), 'a'), ShouldGivePublic(Values.StringValue("b"), "b"));
 }
예제 #3
0
 public override AnyValue Value(int offset)
 {
     return(Values.IntValue(_value[offset]));
 }