Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAbleToAccessNonRegisteredPropertyByName()
        public virtual void ShouldAbleToAccessNonRegisteredPropertyByName()
        {
            Config        config = Config.defaults(ServerSettings.transaction_idle_timeout, "600ms");
            ConfigAdapter wrappingConfiguration = new ConfigAdapter(config);

            assertEquals(Duration.ofMillis(600), wrappingConfiguration.GetProperty(ServerSettings.transaction_idle_timeout.name()));
        }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldContainAllKeysOfPropertiesWithDefaultOrUserDefinedValues()
        public virtual void ShouldContainAllKeysOfPropertiesWithDefaultOrUserDefinedValues()
        {
            // GIVEN

            Config        config = Config.defaults();
            ConfigAdapter wrappingConfiguration = new ConfigAdapter(config);

            // THEN
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
            assertTrue(wrappingConfiguration.Keys.hasNext());
        }
Пример #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldGetDefaultPropertyByKey() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldGetDefaultPropertyByKey()
        {
            // GIVEN
            Config        config = Config.defaults();
            ConfigAdapter wrappingConfiguration = new ConfigAdapter(config);

            // WHEN
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Object propertyValue = wrappingConfiguration.getProperty(org.neo4j.server.configuration.ServerSettings.rest_api_path.name());
            object propertyValue = wrappingConfiguration.GetProperty(ServerSettings.rest_api_path.name());

            // THEN
            assertEquals(new URI(ServerSettings.rest_api_path.DefaultValue), propertyValue);
        }
Пример #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldGetPropertyInRightFormat() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldGetPropertyInRightFormat()
        {
            // GIVEN
            Config        config = Config.defaults();
            ConfigAdapter wrappingConfiguration = new ConfigAdapter(config);

            // WHEN
            wrappingConfiguration.setProperty(ServerSettings.rest_api_path.name(), "http://localhost:7474///db///data///");
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Object dataPath = wrappingConfiguration.getProperty(org.neo4j.server.configuration.ServerSettings.rest_api_path.name());
            object dataPath = wrappingConfiguration.GetProperty(ServerSettings.rest_api_path.name());

            // THEN
            assertEquals(new URI(ServerSettings.rest_api_path.DefaultValue), dataPath);
        }