Package jena

Examples of jena.Arguments


    public static TestSuite suite()
        { return new TestSuite( TestArguments.class ); }

    @Test public void testUnspecifiedAreNull()
        {
        Arguments a = new Arguments( "foo" );
        assertEquals( null, a.valueFor( "foo" ) );
        assertEquals( null, a.valueFor( "spring" ) );
        }
View Full Code Here


        assertEquals( null, a.valueFor( "spring" ) );
        }

    @Test public void testSpecifiedByFollowing()
        {
        Arguments a = new Arguments( "bill ben" );
        a.processArgs( new String [] { "-bill", "william", "-ben", "weed" } );
        assertEquals( "william", a.valueFor( "bill" ) );
        assertEquals( "weed", a.valueFor( "ben" ) );
        }
View Full Code Here

        assertEquals( "weed", a.valueFor( "ben" ) );
        }

    @Test public void testFailureOfUnknownOptions()
        {
        Arguments a = new Arguments( "ok sane" );
        try
            { a.processArgs( new String [] { "-notok", "-insane" } );
            fail( "" ); }
        catch (DoesNotExistException e)
            { pass(); }
        }
View Full Code Here

            { pass(); }
        }

    @Test public void testListArguments()
        {
        Arguments a = new Arguments( "lots" );
        a.processArgs( new String [] { "-lots", "A", "B", "C" } );
        assertEquals( listOfStrings( "A B C" ), a.listFor( "lots" ) );
        }
View Full Code Here

        assertEquals( listOfStrings( "A B C" ), a.listFor( "lots" ) );
        }

    @Test public void testListArgumentsDefault()
        {
        Arguments a = new Arguments( "lots" );
        a.processArgs( new String[0] );
        assertEquals( listOfStrings( "A B C" ), a.listFor( "lots", "A B C" ) );
        }
View Full Code Here

TOP

Related Classes of jena.Arguments

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.