Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldTruncateOffsetSeconds()
        internal virtual void ShouldTruncateOffsetSeconds()
        {
            OffsetTime time = OffsetTime.of(14, 55, 50, 0, ZoneOffset.ofHoursMinutesSeconds(2, 15, 45));

            OffsetTime truncatedTime = TemporalUtil.TruncateOffsetToMinutes(time);

            assertEquals(OffsetTime.of(14, 55, 5, 0, ZoneOffset.ofHoursMinutes(2, 15)), truncatedTime);
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldDoNothingForOffsetWithoutSeconds()
        internal virtual void ShouldDoNothingForOffsetWithoutSeconds()
        {
            OffsetTime time = OffsetTime.of(23, 30, 10, 0, ZoneOffset.ofHoursMinutes(-5, -30));

            OffsetTime truncatedTime = TemporalUtil.TruncateOffsetToMinutes(time);

            assertEquals(time, truncatedTime);
        }
Beispiel #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldHandleDateTimeWithTimeZoneOffset()
        internal virtual void ShouldHandleDateTimeWithTimeZoneOffset()
        {
            DateTimeValue datetime = datetime(1988, 4, 19, 10, 12, 59, 112233445, ZoneOffset.ofHoursMinutes(3, 15));
            PrettyPrinter printer  = new PrettyPrinter();

            datetime.WriteTo(printer);

            assertEquals("{datetime: \"1988-04-19T10:12:59.112233445+03:15\"}", printer.Value());
        }
Beispiel #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldHandleTime()
        internal virtual void ShouldHandleTime()
        {
            TimeValue     time    = time(11, 19, 11, 123456789, ZoneOffset.ofHoursMinutes(-9, -30));
            PrettyPrinter printer = new PrettyPrinter();

            time.WriteTo(printer);

            assertEquals("{time: \"11:19:11.123456789-09:30\"}", printer.Value());
        }
Beispiel #5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldSendAndReceiveDateTimeWithTimeZoneOffset() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldSendAndReceiveDateTimeWithTimeZoneOffset()
        {
            TestSendingAndReceivingOfBoltV2Value(datetime(1899, 1, 1, 12, 12, 32, 0, ZoneOffset.ofHoursMinutes(-4, -15)));
        }
Beispiel #6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReceiveDateTimeWithTimeZoneOffset() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldReceiveDateTimeWithTimeZoneOffset()
        {
            TestReceivingOfBoltV2Value("RETURN datetime({year:2022, month:3, day:2, hour:19, minute:10, timezone:'+02:30'})", datetime(2022, 3, 2, 19, 10, 0, 0, ZoneOffset.ofHoursMinutes(2, 30)));
        }
Beispiel #7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldSendDateTimeWithTimeZoneOffset() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldSendDateTimeWithTimeZoneOffset()
        {
            TestSendingOfBoltV2Value(datetime(424242, 0, ZoneOffset.ofHoursMinutes(-7, -15)));
        }