Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @BeforeClass public static void initServer() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public static void InitServer()
        {
            suppressAll().call((Callable <Void>)() =>
            {
                CommunityServerBuilder serverBuilder = EnterpriseServerBuilder.serverOnRandomPorts();

                PropertyExistenceConstraintsIT._server = ServerHelper.createNonPersistentServer(serverBuilder);
                return(null);
            });
        }
Beispiel #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: AbstractRESTInteraction(java.util.Map<String,String> config) throws java.io.IOException
        internal AbstractRESTInteraction(IDictionary <string, string> config)
        {
            CommunityServerBuilder builder = EnterpriseServerBuilder.serverOnRandomPorts();

            builder = builder.WithProperty((new BoltConnector("bolt")).type.name(), "BOLT").withProperty((new BoltConnector("bolt")).enabled.name(), "true").withProperty((new BoltConnector("bolt")).encryption_level.name(), OPTIONAL.name()).withProperty(LegacySslPolicyConfig.tls_key_file.name(), NeoInteractionLevel.tempPath("key", ".key")).withProperty(LegacySslPolicyConfig.tls_certificate_file.name(), NeoInteractionLevel.tempPath("cert", ".cert")).withProperty(GraphDatabaseSettings.auth_enabled.name(), Convert.ToString(true));

            foreach (KeyValuePair <string, string> entry in config.SetOfKeyValuePairs())
            {
                builder = builder.WithProperty(entry.Key, entry.Value);
            }
            this.Server = builder.Build();
            this.Server.start();
            _authManager           = this.Server.DependencyResolver.resolveDependency(typeof(EnterpriseAuthManager));
            _connectorPortRegister = Server.DependencyResolver.resolveDependency(typeof(ConnectorPortRegister));
        }
Beispiel #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void startServer(boolean authEnabled) throws java.io.IOException
        public override void StartServer(bool authEnabled)
        {
            Server = EnterpriseServerBuilder.serverOnRandomPorts().withProperty(GraphDatabaseSettings.auth_enabled.name(), Convert.ToString(authEnabled)).build();
            Server.start();
        }
Beispiel #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void startServerWithAuthDisabled() throws java.io.IOException
        private void StartServerWithAuthDisabled()
        {
            Server = EnterpriseServerBuilder.serverOnRandomPorts().withProperty(GraphDatabaseSettings.auth_enabled.name(), Convert.ToString(false)).build();
            Server.start();
        }