//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void parsesValues2()
        internal virtual void ParsesValues2()
        {
            OptionalBooleanArg arg = new OptionalBooleanArg("foo", true, "");

            assertEquals("true", arg.Parse(Args.parse()));
            assertEquals("false", arg.Parse(Args.parse("--foo=false")));
            assertEquals("true", arg.Parse(Args.parse("--foo=true")));
            assertEquals("true", arg.Parse(Args.parse("--foo")));
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void parseDatabaseName()
        internal virtual void ParseDatabaseName()
        {
            assertEquals("bob.db", _arg.parse(Args.parse("--database=bob.db")));
        }
Beispiel #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public final void run(String[] args, java.io.PrintStream out) throws Exception
        public override void Run(string[] args, PrintStream @out)
        {
            Run(Args.parse(args), @out);
        }
Beispiel #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void parseDatabaseShouldThrowOnPath()
        internal virtual void ParseDatabaseShouldThrowOnPath()
        {
            Path path = Paths.get("data", "databases", GraphDatabaseSettings.DEFAULT_DATABASE_NAME);

            System.ArgumentException exception = assertThrows(typeof(System.ArgumentException), () => _arg.parse(Args.parse("--database=" + path)));
            assertEquals("'database' should be a name but you seem to have specified a path: " + path, exception.Message);
        }