Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldConvertNanosOfDayToUTCWhenOffsetIsZero()
        internal virtual void ShouldConvertNanosOfDayToUTCWhenOffsetIsZero()
        {
            int nanosOfDayLocal = 42;

            long nanosOfDayUTC = TemporalUtil.NanosOfDayToUTC(nanosOfDayLocal, 0);

            assertEquals(nanosOfDayLocal, nanosOfDayUTC);
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldConvertNanosOfDayToUTC()
        internal virtual void ShouldConvertNanosOfDayToUTC()
        {
            int      nanosOfDayLocal = 42;
            Duration offsetDuration  = Duration.ofMinutes(35);

            long nanosOfDayUTC = TemporalUtil.NanosOfDayToUTC(nanosOfDayLocal, ( int )offsetDuration.Seconds);

            assertEquals(nanosOfDayLocal - offsetDuration.toNanos(), nanosOfDayUTC);
        }