Package mock.java.util

Examples of mock.java.util.ListMock


    /**
     * Tests that all the mock objects can be initialised correctly.
     */
    public void testInitialisation() {
        new CollectionMock("collection", expectations);
        new ListMock("list", expectations);
        new SetMock("set", expectations);
        new IteratorMock("iterator", expectations);
        new MapMock("map", expectations);
    }
View Full Code Here


    /**
     * Ensure that clashing fuzzy methods are correctly handled.
     */
    public void testListExpectations() {
        ListMock listMock = new ListMock("listMock", expectations);
        listMock.fuzzy.remove(ListMock._getMethodIdentifier("remove(java.lang.Object)"), this).returns(false);
        assertFalse(listMock.remove(this));

        listMock.fuzzy.remove(ListMock._getMethodIdentifier("remove(int)"), new Integer(4))
                .returns(this);
        assertSame(this, listMock.remove(4));
    }
View Full Code Here

TOP

Related Classes of mock.java.util.ListMock

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.