Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldApproximateWithoutAccumulatedRoundingErrors2()
        public virtual void ShouldApproximateWithoutAccumulatedRoundingErrors2()
        {
            double        months = 1.9013243104086859E-16; // 0.5 ns
            double        nanos  = 0.6;                    // with 1.1 ns we should be on the safe side to get rounded to 1 ns, even with rounding errors
            DurationValue result = DurationValue.Approximate(months, 0, 0, nanos);

            assertEqual(result, DurationValue.Duration(0, 0, 0, 1));
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldApproximateWithoutAccumulatedRoundingErrors()
        public virtual void ShouldApproximateWithoutAccumulatedRoundingErrors()
        {
            DurationValue result = DurationValue.Approximate(10.8, 0, 0, 0);

            assertEqual(result, DurationValue.Duration(10, 24, 30196, 800000000));
        }