Package net.sourceforge.argparse4j.internal.ArgumentParserImpl

Examples of net.sourceforge.argparse4j.internal.ArgumentParserImpl.Candidate


        assertEquals("argparse4j version 7.8.7 (Dreamliner)", ap.formatVersion());
    }

    @Test
    public void testCandidateEquality() {
        Candidate foo = new Candidate(15, "foo");
        Candidate fooCopy = new Candidate(15, "foo");
        Candidate bar = new Candidate(15, "bar");
        Candidate foo2 = new Candidate(16, "foo");
        assertTrue(foo.equals(foo));
        assertTrue(foo.equals(fooCopy));
        assertFalse(foo.equals(bar));
        assertFalse(foo.equals(foo2));
        assertFalse(foo.equals(null));
        assertFalse(foo.equals("foo"));
        Candidate subNull = new Candidate(15, null);
        assertFalse(foo.equals(subNull));
        assertFalse(subNull.equals(foo));

        assertEquals(foo.hashCode(), fooCopy.hashCode());
        assertFalse(foo.hashCode() == foo2.hashCode());
        assertFalse(foo.hashCode() == bar.hashCode());
        assertFalse(foo.hashCode() == subNull.hashCode());
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.argparse4j.internal.ArgumentParserImpl.Candidate

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.