//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldHandleTemporalUsingGraphResultDataContent() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldHandleTemporalUsingGraphResultDataContent() { //Given GraphDatabaseFacade db = Server().Database.Graph; ZonedDateTime date = ZonedDateTime.of(1980, 3, 11, 0, 0, 0, 0, ZoneId.of("Europe/Stockholm")); using (Transaction tx = Db.beginTx()) { Node node = Db.createNode(label("N")); node.SetProperty("date", date); tx.Success(); } //When HTTP.Response response = RunQuery("MATCH (n:N) RETURN n", "graph"); //Then assertEquals(200, response.Status()); AssertNoErrors(response); JsonNode row = response.Get("results").get(0).get("data").get(0).get("graph").get("nodes").get(0).get("properties").get("date"); assertEquals("\"1980-03-11T00:00+01:00[Europe/Stockholm]\"", row.ToString()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldHandleDurationArraysUsingGraphResultDataContent() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldHandleDurationArraysUsingGraphResultDataContent() { //Given GraphDatabaseFacade db = Server().Database.Graph; Duration duration = Duration.ofSeconds(73); using (Transaction tx = Db.beginTx()) { Node node = Db.createNode(label("N")); node.SetProperty("durations", new Duration[] { duration }); tx.Success(); } //When HTTP.Response response = RunQuery("MATCH (n:N) RETURN n", "graph"); //Then assertEquals(200, response.Status()); AssertNoErrors(response); JsonNode row = response.Get("results").get(0).get("data").get(0).get("graph").get("nodes").get(0).get("properties").get("durations").get(0); assertEquals("\"PT1M13S\"", row.ToString()); }