//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")); } }
//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")); } }