Examples of OrderedExpectations


Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // ---------------------------------------------------------------------

        // Register the service, this should succeed and cause the
        // use count of the service to be incremented.

        expectations.add(new OrderedExpectations() {
            public void add() {

                managerMock.expects.factoryRegistered(referenceMock)
                        .description("Register Successfully Bound");

                contextMock.expects.getService(referenceMock)
                        .description("Register Increment Use Count")
                        .returns(null);
            }
        });

        trackerListener.serviceChanged(
                new ServiceEvent(ServiceEvent.REGISTERED, referenceMock));

        // ---------------------------------------------------------------------
        // Modify Service
        // ---------------------------------------------------------------------

        // Modifying the service does not require any changes to the use count
        // of the service.

        managerMock.expects.factoryModified(referenceMock)
                .description("Modify Service");

        trackerListener.serviceChanged(
                new ServiceEvent(ServiceEvent.MODIFIED, referenceMock));

        // ---------------------------------------------------------------------
        // Unregister Service
        // ---------------------------------------------------------------------

        // Unregistering the service must decrement the use count of the
        // service.

        expectations.add(new OrderedExpectations() {
            public void add() {

                managerMock.expects.factoryUnregistering(referenceMock)
                        .description("Unregistering Service");
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // ---------------------------------------------------------------------

        // Register the service, this should succeed and cause the
        // use count of the service to be incremented.

        expectations.add(new OrderedExpectations() {
            public void add() {

                managerMock.expects.serviceRegistered(referenceMock)
                        .description("Register Successfully Bound");

                contextMock.expects.getService(referenceMock)
                        .description("Register Increment Use Count")
                        .returns(null);
            }
        });

        trackerListener.serviceChanged(
                new ServiceEvent(ServiceEvent.REGISTERED, referenceMock));

        // ---------------------------------------------------------------------
        // Modify Service
        // ---------------------------------------------------------------------

        // Modifying the service does not require any changes to the use count
        // of the service.

        managerMock.expects.serviceModified(referenceMock)
                .description("Modify Service");

        trackerListener.serviceChanged(
                new ServiceEvent(ServiceEvent.MODIFIED, referenceMock));

        // ---------------------------------------------------------------------
        // Unregister Service
        // ---------------------------------------------------------------------

        // Unregistering the service must decrement the use count of the
        // service.

        expectations.add(new OrderedExpectations() {
            public void add() {

                managerMock.expects.serviceUnregistering(referenceMock)
                        .description("Unregistering Service");
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // ---------------------------------------------------------------------

        // Register the service, this should succeed and cause the
        // use count of the service to be incremented.

        expectations.add(new OrderedExpectations() {
            public void add() {

                pluginManagerMock.expects.pluginRegistered(referenceMock)
                        .description("Register Successfully Bound");

                contextMock.expects.getService(referenceMock)
                        .description("Register Increment Use Count")
                        .returns(null);
            }
        });

        trackerListener.serviceChanged(
                new ServiceEvent(ServiceEvent.REGISTERED, referenceMock));

        // ---------------------------------------------------------------------
        // Modify Service
        // ---------------------------------------------------------------------

        // Modifying the service does not require any changes to the use count
        // of the service.

        pluginManagerMock.expects.pluginModified(referenceMock)
                .description("Modify Service");

        trackerListener.serviceChanged(
                new ServiceEvent(ServiceEvent.MODIFIED, referenceMock));

        // ---------------------------------------------------------------------
        // Unregister Service
        // ---------------------------------------------------------------------

        // Unregistering the service must decrement the use count of the
        // service.

        expectations.add(new OrderedExpectations() {
            public void add() {

                pluginManagerMock.expects.pluginUnregistering(referenceMock)
                        .description("Unregistering Service");
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                addProviderExpectation(key1, null,
                        new ProviderResult(value1, root, true, null));
                addProviderExpectation(key2, null,
                        new ProviderResult(value2, root, true, null));
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                addProviderExpectation(key1, null,
                        new ProviderResult(value1, root, true, null));

                // First time expiration checker reports that entry has not
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

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

        final IllegalStateException throwable =
                new IllegalStateException("expected");

        expectations.add(new OrderedExpectations() {
            public void add() {
                addProviderExpectation(key1, null,
                        new ProviderResult(value1, root, true, null));

                // Expiration check for second request reports that entry has
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                listenerMock1.expects.entryRemoved(entryMock);
                listenerMock2.expects.entryRemoved(entryMock);
            }
        });
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                listenerMock1.expects.entryRemoved(entryMock);
                listenerMock2.expects.entryRemoved(entryMock);
                listenerMock3.expects.entryRemoved(entryMock);
            }
        });

        expectations.add(new OrderedExpectations() {
            public void add() {
                listenerMock1.expects.entryRemoved(entryMock);
                listenerMock3.expects.entryRemoved(entryMock);
            }
        });

        expectations.add(new OrderedExpectations() {
            public void add() {
                listenerMock1.expects.entryRemoved(entryMock);
            }
        });
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        expectations.add(new OrderedExpectations() {
            public void add() {
                listenerMock1.expects.entryRemoved(entryMock);
                listenerMock2.expects.entryRemoved(entryMock);
            }
        });
View Full Code Here

Examples of com.volantis.testtools.mock.expectations.OrderedExpectations

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

        compiledSchemaMock.expects.getElementValidator(elementType)
                .returns(validatorMock).any();

        expectations.add(new OrderedExpectations() {
            public void add() {
                validatorMock.expects.open(null);
                {
                    // The character data is required (not whitespace) and was
                    // consumed (returns true).
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.