Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @BeforeClass public static void ensureServerNotRunning() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public static void EnsureServerNotRunning()
        {
            System.setProperty("org.neo4j.useInsecureCertificateGeneration", "true");
            suppressAll().call((Callable <Void>)() =>
            {
                ServerHolder.EnsureNotRunning();
                return(null);
            });
        }
Пример #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: @AfterClass public static void releaseServer() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public static void ReleaseServer()
        {
            try
            {
                suppressAll().call((Callable <Void>)() =>
                {
                    ServerHolder.Release(_server);
                    return(null);
                });
            }
            finally
            {
                _server = null;
            }
        }