Exemple #1
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());
        }
Exemple #2
0
 public StatementAnonymousInnerClass(Neo4jRule outerInstance, Statement @base)
 {
     this.outerInstance = outerInstance;
     this.@base         = @base;
 }