Package net.sourceforge.argparse4j

Source Code of net.sourceforge.argparse4j.ArgumentParsersTest

package net.sourceforge.argparse4j;

import static org.junit.Assert.*;

import net.sourceforge.argparse4j.internal.ArgumentParserImpl;

import org.junit.Test;

public class ArgumentParsersTest {

    @Test
    public void testNewArgumentParser() {
        ArgumentParserImpl ap = (ArgumentParserImpl) ArgumentParsers
                .newArgumentParser("prog", false, "+", "@");
        assertEquals("prog", ap.getProg());
        assertEquals("+", ap.getPrefixChars());
        assertEquals("@", ap.getFromFilePrefixChars());
        // Check +h can be added because addHelp is false
        ap.addArgument("+h");
    }

}
TOP

Related Classes of net.sourceforge.argparse4j.ArgumentParsersTest

TOP
Copyright © 2018 www.massapi.com. 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.