OptionSetEqualsHashCodeTest.java :  » Development » JOpt-Simple » joptsimple » Java Open Source

Java Open Source » Development » JOpt Simple 
JOpt Simple » joptsimple » OptionSetEqualsHashCodeTest.java
/*
 Copyright 2004-2007 Paul R. Holser, Jr.  All rights reserved.
 Licensed under the Academic Free License version 3.0
 */

package joptsimple;

import junitx.extensions.EqualsHashCodeTestCase;

/**
 * @author <a href="mailto:pholser@alumni.rice.edu">Paul Holser</a>
 * @version $Id: OptionSetEqualsHashCodeTest.java,v 1.9 2007/04/10 20:06:27 pholser Exp $
 */
public class OptionSetEqualsHashCodeTest extends EqualsHashCodeTestCase {
    public OptionSetEqualsHashCodeTest( String name ) {
        super( name );
    }

    protected Object createInstance() {
        OptionSet options = new OptionSet();

        options.addWithArgument( "anOption", "anArg" );
        options.addNonOptionArgument( "aNonOptionArgument" );

        return options;
    }

    protected Object createNotEqualInstance() {
        OptionSet options = new OptionSet();

        options.addWithArgument( "anOption", "aDifferentArg" );
        options.addNonOptionArgument( "aNonOptionArgument" );

        return options;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.