Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void failIfInvalidModeSpecified()
        internal virtual void FailIfInvalidModeSpecified()
        {
            using (NullOutsideWorld outsideWorld = new NullOutsideWorld())
            {
                ImportCommand importCommand = new ImportCommand(_testDir.directory("home").toPath(), _testDir.directory("conf").toPath(), outsideWorld);

                string[]       arguments      = new string[] { "--mode=foo", "--database=bar", "--from=baz" };
                IncorrectUsage incorrectUsage = assertThrows(typeof(IncorrectUsage), () => importCommand.execute(arguments));
                assertThat(incorrectUsage.Message, containsString("foo"));
            }
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void requiresDatabaseArgument()
        internal virtual void RequiresDatabaseArgument()
        {
            using (NullOutsideWorld outsideWorld = new NullOutsideWorld())
            {
                ImportCommand importCommand = new ImportCommand(_testDir.directory("home").toPath(), _testDir.directory("conf").toPath(), outsideWorld);

                string[]       arguments      = new string[] { "--mode=database", "--from=bar" };
                IncorrectUsage incorrectUsage = assertThrows(typeof(IncorrectUsage), () => importCommand.execute(arguments));
                assertThat(incorrectUsage.Message, containsString("database"));
            }
        }