Package de.abstrakt.mock.utils

Examples of de.abstrakt.mock.utils.Wrapper


        {
            addExpectationToBlock(marker, params, returnValue);
        }
        else
        {
            expectations.add(new Wrapper(marker, params));
            returns.add(returnValue);
        }

        expects.add(marker);
        checkConsistency(marker);
View Full Code Here


        if( inActualBlock() )
        {
            return getExpectationFromBlock(marker, params);
        }

        if (!RecursiveComparator.equals(expectations.get(0),new Wrapper(marker, params)))
        {
            throw unexpectedCall(marker, params);
        }

        return nextExpectation();
View Full Code Here

    private static void addExpectationToBlock(String marker, List params, Object returnValue)
    {
        Map map = getBlockMap();

        // dozen: list is for duplicate calls in one block
        Wrapper wrapper = new Wrapper(marker, params);
        List rets = (List) map.get(wrapper);
        if (rets == null)
        {
            rets = new LinkedList();
            map.put(wrapper, rets);
View Full Code Here

    private static Object getExpectationFromBlock(String marker, List params)
        throws IllegalStateException
    {
        Map map = (Map) expectations.get(0);

        Wrapper key = new Wrapper(marker, params);
        List lst = (List) map.get(key);

        if ((lst == null) || (lst.size() == 0))
        {
            throw unexpectedCall(marker, params);
View Full Code Here

TOP

Related Classes of de.abstrakt.mock.utils.Wrapper

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.