Exemple #1
0
        public override Statement Apply(Statement @base, Description description)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.junit.runners.model.Statement externalRuleStatement = super.apply(super, description);
            Statement externalRuleStatement = base.Apply(@base, description);

            return(new StatementAnonymousInnerClass(this, externalRuleStatement));
        }
Exemple #2
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
//ORIGINAL LINE: public final org.junit.runners.model.Statement apply(final org.junit.runners.model.Statement super, org.junit.runner.Description description)
        public override Statement Apply(Statement @base, Description description)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.test.rule.TestDirectory dir = org.neo4j.test.rule.TestDirectory.testDirectory(description.getTestClass());
            TestDirectory dir = TestDirectory.testDirectory(description.TestClass);

            return(dir.apply(new StatementAnonymousInnerClass(this, @base, dir)
                             , description));
        }
Exemple #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static java.net.URI getHttpsUriFromNeo4jRule(java.net.URI configuredHttpsUri) throws Throwable
        private static URI GetHttpsUriFromNeo4jRule(URI configuredHttpsUri)
        {
            ServerControls serverControls = mock(typeof(ServerControls));

            when(serverControls.HttpsURI()).thenReturn(Optional.ofNullable(configuredHttpsUri));
            TestServerBuilder serverBuilder = mock(typeof(TestServerBuilder));

            when(serverBuilder.NewServer()).thenReturn(serverControls);

            Neo4jRule rule = new Neo4jRule(serverBuilder);

            AtomicReference <URI> uriRef    = new AtomicReference <URI>();
            Statement             statement = rule.apply(new StatementAnonymousInnerClass(rule, uriRef)
                                                         , createTestDescription(typeof(Neo4jRuleTest), "test"));

            statement.evaluate();
            return(uriRef.get());
        }
 public StatementAnonymousInnerClassHelper(TestRuleAnonymousInnerClassHelper outerInstance, Statement @base)
 {
     this.outerInstance = outerInstance;
       this.@base = @base;
 }
 public override Statement Apply(Statement @base, Description description)
 {
     return new StatementAnonymousInnerClassHelper(this, @base);
 }
 public StatementAnonymousInnerClass(CursorsClosedPostCondition outerInstance, Statement @base)
 {
     this.outerInstance = outerInstance;
     this.@base         = @base;
 }
 public override Statement Apply(Statement @base, Description description)
 {
     return(new StatementAnonymousInnerClass(this, @base));
 }
Exemple #8
0
 public StatementAnonymousInnerClass(SystemExitRule outerInstance, Statement externalRuleStatement)
 {
     this.outerInstance          = outerInstance;
     this._externalRuleStatement = externalRuleStatement;
 }
Exemple #9
0
 public StatementAnonymousInnerClass(ManagedResource <R> outerInstance, Statement @base, TestDirectory dir)
 {
     this.outerInstance = outerInstance;
     this.@base         = @base;
     this._dir          = dir;
 }
 public override Statement Apply(Statement @base, Description description)
 {
     return(_testDirectory.apply(base.Apply(@base, description), description));
 }
Exemple #11
0
 public StatementAnonymousInnerClass(MockInitialContextRule outerInstance, Statement @base)
 {
     this.outerInstance = outerInstance;
     this.@base         = @base;
 }