Package com.volantis.mcs.papi.impl

Examples of com.volantis.mcs.papi.impl.TestableSpanElementImpl


        SpanAttributes attrsAttributes =
                (SpanAttributes) createTestableAttrsAttributes();
        attrsAttributes.setSrc("{expression.ext}");

        TestableSpanElementImpl element = (TestableSpanElementImpl)
                createTestablePAPIElement();

        com.volantis.mcs.protocols.SpanAttributes protocolAttributes =
                new com.volantis.mcs.protocols.SpanAttributes();

        element.setVolantisAttributes(protocolAttributes);

        element.elementStart(requestContext, attrsAttributes);
    }
View Full Code Here


        SpanAttributes attrsAttributes =
                (SpanAttributes) createTestableAttrsAttributes();
        attrsAttributes.setSrc("not an epxression");

        TestableSpanElementImpl element = (TestableSpanElementImpl)
                createTestablePAPIElement();

        com.volantis.mcs.protocols.SpanAttributes protocolAttributes =
                new com.volantis.mcs.protocols.SpanAttributes();

        element.setVolantisAttributes(protocolAttributes);

        element.elementStart(requestContext, attrsAttributes);

        assertTrue("src property in protocol attributes should not be" +
                   " equal to src property on papi attributes",
                   !attrsAttributes.getSrc().
                    equals(protocolAttributes.getSrc()));
View Full Code Here

    public void testElementStartAddsStyles() throws PAPIException {
        SpanAttributes attrsAttributes =
                (SpanAttributes) createTestableAttrsAttributes();
        attrsAttributes.setSrc("{expression.ext}");

        TestableSpanElementImpl element = (TestableSpanElementImpl)
                createTestablePAPIElement();

        final TextAssetReferenceMock textAssetReferenceMock =
                new TextAssetReferenceMock("textAssetReferenceMock",
                        expectations);

        referenceResolverMock.expects
                .resolveQuotedTextExpression("{expression.ext}")
                .returns(textAssetReferenceMock).any();

        textAssetReferenceMock.expects.isPolicy().returns(false).any();

        com.volantis.mcs.protocols.SpanAttributes protocolAttributes =
                new com.volantis.mcs.protocols.SpanAttributes();

        element.setVolantisAttributes(protocolAttributes);

        element.elementStart(requestContext, attrsAttributes);

        // ensure that there is a CSP Container in the protocol attributes
        Styles styles = protocolAttributes.getStyles();
        assertNotNull("The protocol attributes should have a Styles after" +
                "elementStart has been called", styles);
View Full Code Here

        return new SpanAttributes();
    }

    // javadoc inherited
    protected PAPIElement createTestablePAPIElement() {
        return new TestableSpanElementImpl();
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.papi.impl.TestableSpanElementImpl

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.