예제 #1
0
//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();
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @BeforeClass public static void allocateServer() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public static void AllocateServer()
        {
            System.setProperty("org.neo4j.useInsecureCertificateGeneration", "true");
            suppressAll().call((Callable <Void>)() =>
            {
                ServerHolder.SetServerBuilderProperty(GraphDatabaseSettings.cypher_hints_error.name(), "true");
                ServerHolder.SetServerBuilderProperty(GraphDatabaseSettings.transaction_timeout.name(), "300s");
                ServerHolder.SetServerBuilderProperty(ServerSettings.transaction_idle_timeout.name(), "300s");
                _server = ServerHolder.Allocate();
                ServerHelper.cleanTheDatabase(_server);
                return(null);
            });
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void cleanTheDatabase()
        public virtual void CleanTheDatabase()
        {
            ServerHelper.cleanTheDatabase(_server);
        }
예제 #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setupServer() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void SetupServer()
        {
            _logProvider = new AssertableLogProvider();
            _server      = ServerHelper.createNonPersistentServer(_logProvider);
            ServerHelper.cleanTheDatabase(_server);
        }
예제 #5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @BeforeClass public static void setupServer() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public static void SetupServer()
        {
            @out    = new MemoryStream();
            _server = ServerHelper.createNonPersistentServer(FormattedLogProvider.toOutputStream(@out));
        }
예제 #6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void Setup()
        {
            ServerHelper.cleanTheDatabase(_readOnlyServer);
            _readOnlyServer = ServerHelper.createReadOnlyServer(Dir.storeDir());
            _http           = HTTP.withBaseUri(_readOnlyServer.baseUri());
        }
예제 #7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @BeforeClass public static void startServer() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public static void StartServer()
        {
            _server = ServerHelper.createNonPersistentServer();
        }