internal DiagnosticsReportCommand(Path homeDir, Path configDir, OutsideWorld outsideWorld)
 {
     this._homeDir   = homeDir;
     this._configDir = configDir;
     this._fs        = outsideWorld.FileSystem();
     this.@out       = outsideWorld.OutStream();
     _err            = outsideWorld.ErrorStream();
 }
Example #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void listShouldDisplayAllClassifiers() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ListShouldDisplayAllClassifiers()
        {
            using (MemoryStream baos = new MemoryStream())
            {
                PrintStream  ps           = new PrintStream(baos);
                string[]     args         = new string[] { "--list" };
                OutsideWorld outsideWorld = mock(typeof(OutsideWorld));
                when(outsideWorld.FileSystem()).thenReturn(_fs);
                when(outsideWorld.OutStream()).thenReturn(ps);

                DiagnosticsReportCommand diagnosticsReportCommand = new DiagnosticsReportCommand(_homeDir, _configDir, outsideWorld);
                diagnosticsReportCommand.Execute(args);

                assertThat(baos.ToString(), @is(string.Format("Finding running instance of neo4j%n" + "No running instance of neo4j was found. Online reports will be omitted.%n" + "If neo4j is running but not detected, you can supply the process id of the running instance with --pid%n" + "All available classifiers:%n" + "  config     include configuration file%n" + "  logs       include log files%n" + "  plugins    include a view of the plugin directory%n" + "  ps         include a list of running processes%n" + "  tree       include a view of the tree structure of the data directory%n" + "  tx         include transaction logs%n")));
            }
        }
Example #3
0
 internal HttpCopier(OutsideWorld outsideWorld) : this(outsideWorld, Thread.sleep, (text, length)->ProgressMonitorFactory.textual(outsideWorld.OutStream()).singlePart(text, length))
 {
 }