Examples of ExpectedValue


Examples of com.volantis.testtools.mock.value.ExpectedValue

        }

        // Assume that all the actual value matched.
        boolean matched = true;
        for (int i = 0; i < expectedValues.length; i++) {
            ExpectedValue expectedValue = expectedValues[i];
            Object actualValue = actualValues[i];
            if (!expectedValue.matches(actualValue)) {
                matched = false;
            }
        }

        if (!matched) {
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

    public String toString() {
        StringBuffer buffer = new StringBuffer(40);
        buffer.append("Invoked Method: ").append(method.getName()).append("(");
        ExpectedValue[] expectedValues = arguments.getExpectedValues();
        for (int i = 0; i < expectedValues.length; i++) {
            ExpectedValue expectedValue = expectedValues[i];
            if (i > 0) {
                buffer.append(", ");
            }
            buffer.append(expectedValue);
        }
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

        // =====================================================================

        // Create a sequence of shared expectations.
        ExpectationBuilder expects = mockFactory.createOrderedBuilder();

        final ExpectedValue EXPECTS_INSTANCE_OF_REPORT =
                mockFactory.expectsInstanceOf(Report.class);

        final InternalExpectationMock expectationMock =
                new InternalExpectationMock("expectationMock", expects);
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

        // =====================================================================

        // Create a sequence of shared expectations.
        ExpectationBuilder expectations = mockFactory.createOrderedBuilder();

        final ExpectedValue EXPECTS_INSTANCE_OF_REPORT =
                mockFactory.expectsInstanceOf(Report.class);

        final InternalExpectationMock expectation1Mock =
                new InternalExpectationMock("expectation1Mock", expectations);
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

        // Iterate over the values testing each in turn. If any of the values
        // fail to match then this method fails immediately, otherwise this
        // method will succeed.
        if (values != null) {
            for (Iterator i = values.iterator(); i.hasNext();) {
                ExpectedValue value = (ExpectedValue) i.next();
                if (value.matches(object)) {
                    return true;
                }
            }
        }
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

        // Iterate over the values testing each in turn. If any of the values
        // fail to match then this method fails immediately, otherwise this
        // method will succeed.
        if (values != null) {
            for (Iterator i = values.iterator(); i.hasNext();) {
                ExpectedValue value = (ExpectedValue) i.next();
                if (!value.matches(object)) {
                    return false;
                }
            }
        }
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

    public ExpectedValue expectsArrayOf(Class componentClass) {
        return new ExpectedArrayOf(componentClass);
    }

    public ExpectedValue expectsToStringOf(final String toString) {
        return new ExpectedValue() {
            public boolean matches(Object object) {
                return String.valueOf(object).equals(toString);
            }
        };
    }
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

        final RemovalListenerMock listener4Mock =
                new RemovalListenerMock("listener4Mock", expectations);

        ExpectCacheEntry removeGroup2Key1 = new ExpectCacheEntry(
                "group2.key1", "value for (group2.key1)");
        ExpectedValue expectsCacheEntry =
                mockFactory.expectsInstanceOf(CacheEntry.class);
        listener2Mock.fuzzy
                .entryRemoved(expectsCacheEntry)
                .does(removeGroup2Key1);
        listenerRootMock.fuzzy
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

                                SeparatorRenderer triggeringSeparator,
                                MethodAction action) {

        CompositeExpectedValue expectedDecisionValue =
            MockFactory.getDefaultInstance().expectsAll();
        ExpectedValue value;

        // All that we can tell about the decision object itself is that it is
        // a decison object, as the compiler should detect an invalid object
        // being passed we do not have anything to do.
View Full Code Here

Examples of com.volantis.testtools.mock.value.ExpectedValue

        // Create test objects.
        StylesMock styles = new StylesMock("styles", expectations);
        StylesMock stylesCopy = new StylesMock("stylesCopy", expectations);
        MutablePropertyValuesMock propertyValues =
                new MutablePropertyValuesMock("propertyValues", expectations);
        final ExpectedValue attributes =
                mockFactory.expectsInstanceOf(SpanAttributes.class);

        // Set expectations.
        item.expects.getMenu().returns(menu);
        item.expects.getShortcut().returns(shortcutValue);
View Full Code Here
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.