Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SafeVarargs private final <T> void shouldOverride(System.Func<T,org.neo4j.unsafe.impl.batchimport.input.csv.Configuration> configFactory, System.Func<org.neo4j.unsafe.impl.batchimport.input.csv.Configuration,T> getter, T... values)
        private void ShouldOverride <T>(System.Func <T, Configuration> configFactory, System.Func <Configuration, T> getter, params T[] values)
        {
            foreach (T value in values)
            {
                // given
                Configuration configuration = configFactory(value);
                WrappedCsvInputConfigurationForNeo4jAdmin vanilla = new WrappedCsvInputConfigurationForNeo4jAdmin(COMMAS);

                // when
                WrappedCsvInputConfigurationForNeo4jAdmin wrapped = new WrappedCsvInputConfigurationForNeo4jAdmin(configuration);

                // then
                assertEquals(getter(vanilla), getter(wrapped));
            }
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SafeVarargs private final <T> void shouldDelegate(System.Func<T,org.neo4j.unsafe.impl.batchimport.input.csv.Configuration> configFactory, System.Func<org.neo4j.unsafe.impl.batchimport.input.csv.Configuration,T> getter, T... expectedValues)
        private void ShouldDelegate <T>(System.Func <T, Configuration> configFactory, System.Func <Configuration, T> getter, params T[] expectedValues)
        {
            foreach (T expectedValue in expectedValues)
            {
                // given
                Configuration configuration = configFactory(expectedValue);

                // when
                WrappedCsvInputConfigurationForNeo4jAdmin wrapped = new WrappedCsvInputConfigurationForNeo4jAdmin(configuration);

                // then
                assertEquals(expectedValue, getter(wrapped));
            }

            // then
            assertEquals(getter(COMMAS), getter(new WrappedCsvInputConfigurationForNeo4jAdmin(COMMAS)));
        }