Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldMakeFromCanonical() throws java.io.IOException, org.neo4j.commandline.admin.CommandFailed, org.neo4j.commandline.admin.IncorrectUsage, org.neo4j.dbms.archive.IncorrectFormat
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldMakeFromCanonical()
        {
            Path dataDir     = _testDirectory.directory("some-other-path").toPath();
            Path databaseDir = dataDir.resolve("databases/foo.db");

            Files.createDirectories(databaseDir);
            Files.write(_configDir.resolve(Config.DEFAULT_CONFIG_FILE_NAME), singletonList(FormatProperty(data_directory, dataDir)));

            (new LoadCommand(_homeDir, _configDir, _loader)).execute(ArrayUtil.concat(new string[] { "--database=foo.db", "--from=foo.dump" }));

            verify(_loader).load(eq(Paths.get((new File("foo.dump")).CanonicalPath)), any(), any());
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void execute(String database, String... otherArgs) throws org.neo4j.commandline.admin.IncorrectUsage, org.neo4j.commandline.admin.CommandFailed
        private void Execute(string database, params string[] otherArgs)
        {
            (new LoadCommand(_homeDir, _configDir, _loader)).execute(ArrayUtil.concat(new string[] { "--database=" + database, "--from=" + _archive }, otherArgs));
        }