//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void givenExplicitlyDisabledServerLoggingConfigurationShouldNotLogAccesses() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void GivenExplicitlyDisabledServerLoggingConfigurationShouldNotLogAccesses() { // given string directoryPrefix = _testName.MethodName; File logDirectory = _testDirectory.directory(directoryPrefix + "-logdir"); NeoServer server = serverOnRandomPorts().withDefaultDatabaseTuning().persistent().withProperty(ServerSettings.http_logging_enabled.name(), Settings.FALSE).withProperty(GraphDatabaseSettings.logs_directory.name(), logDirectory.ToString()).withProperty((new BoltConnector("bolt")).listen_address.name(), ":0").usingDataDir(_testDirectory.directory(directoryPrefix + "-dbdir").AbsolutePath).build(); try { server.Start(); FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(server); // when string query = "?implicitlyDisabled" + RandomString(); JaxRsResponse response = (new RestRequest()).get(functionalTestHelper.ManagementUri() + query); assertThat(response.Status, @is(HttpStatus.SC_OK)); response.Close(); // then File httpLog = new File(logDirectory, "http.log"); assertThat(httpLog.exists(), @is(false)); } finally { server.Stop(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void givenExplicitlyEnabledServerLoggingConfigurationShouldLogAccess() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void GivenExplicitlyEnabledServerLoggingConfigurationShouldLogAccess() { // given string directoryPrefix = _testName.MethodName; File logDirectory = _testDirectory.directory(directoryPrefix + "-logdir"); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final String query = "?explicitlyEnabled=" + randomString(); string query = "?explicitlyEnabled=" + RandomString(); NeoServer server = serverOnRandomPorts().withDefaultDatabaseTuning().persistent().withProperty(ServerSettings.http_logging_enabled.name(), Settings.TRUE).withProperty(GraphDatabaseSettings.logs_directory.name(), logDirectory.AbsolutePath).withProperty((new BoltConnector("bolt")).listen_address.name(), ":0").usingDataDir(_testDirectory.directory(directoryPrefix + "-dbdir").AbsolutePath).build(); try { server.Start(); FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(server); // when JaxRsResponse response = (new RestRequest()).get(functionalTestHelper.ManagementUri() + query); assertThat(response.Status, @is(HttpStatus.SC_OK)); response.Close(); // then File httpLog = new File(logDirectory, "http.log"); assertEventually("request appears in log", FileContentSupplier(httpLog), containsString(query), 5, TimeUnit.SECONDS); } finally { server.Stop(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldDefaultToSensiblePortIfNoneSpecifiedInConfig() public virtual void ShouldDefaultToSensiblePortIfNoneSpecifiedInConfig() { FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(Server()); JaxRsResponse response = functionalTestHelper.Get(functionalTestHelper.ManagementUri()); assertThat(response.Status, @is(200)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @BeforeClass public static void setupServer() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public static void SetupServer() { Server = EnterpriseServerBuilder.serverOnRandomPorts().usingDataDir(StaticFolder.Root.AbsolutePath).build(); suppressAll().call((Callable <Void>)() => { Server.start(); return(null); }); FunctionalTestHelper = new FunctionalTestHelper(Server); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldMakeJAXRSClassesAvailableViaHTTP() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldMakeJAXRSClassesAvailableViaHTTP() { CommunityServerBuilder builder = CommunityServerBuilder.server(); _server = ServerHelper.createNonPersistentServer(builder); FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(_server); JaxRsResponse response = (new RestRequest()).get(functionalTestHelper.ManagementUri()); assertEquals(200, response.Status); response.Close(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @BeforeClass public static void allocateServer() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public static void AllocateServer() { _server = CommunityServerBuilder.serverOnRandomPorts().usingDataDir(StaticFolder.Root.AbsolutePath).withAutoIndexingEnabledForNodes("foo", "bar").build(); _server.start(); _functionalTestHelper = new FunctionalTestHelper(_server); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @BeforeClass public static void setupServer() public static void SetupServer() { FunctionalTestHelper functionalTestHelper = new FunctionalTestHelper(Server()); _helper = functionalTestHelper.GraphDbHelper; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @BeforeClass public static void setupServer() public static void SetupServer() { _functionalTestHelper = new FunctionalTestHelper(Server()); }