예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testDateTimeTypeWithZoneOffset()
        public virtual void TestDateTimeTypeWithZoneOffset()
        {
            DateTimeValue dateTime = DateTimeValue.datetime(1991, 1, 1, 0, 0, 13, 37, "+01:00");
            string        key      = "dt";

            _node1.setProperty(key, dateTime);
            NewTransaction();

            object property = _node1.getProperty(key);

            assertEquals(dateTime.AsObjectCopy(), property);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testDateTimeTypeWithZoneId()
        public virtual void TestDateTimeTypeWithZoneId()
        {
            DateTimeValue dateTime = DateTimeValue.datetime(1991, 1, 1, 0, 0, 13, 37, ZoneId.of("Europe/Stockholm"));
            string        key      = "dt";

            _node1.setProperty(key, dateTime);
            NewTransaction();

            object property = _node1.getProperty(key);

            assertEquals(dateTime.AsObjectCopy(), property);
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldHandleDateTimeWithZoneId()
        public virtual void ShouldHandleDateTimeWithZoneId()
        {
            // Given
            DateTimeValue dvalue = DateTimeValue.datetime(1, 2, 3, 4, 5, 6, 7, ZoneId.of("Europe/Stockholm"));

            // When
            dvalue.WriteTo(_converter);

            // Then
            object value = _converter.value();

            assertThat(value, instanceOf(typeof(ZonedDateTime)));
            assertThat(value, equalTo(dvalue.AsObjectCopy()));
        }
예제 #4
0
 public override ZonedDateTime MapDateTime(DateTimeValue value)
 {
     return(value.AsObjectCopy());
 }