Examples of StylePropertyMock


Examples of com.volantis.styling.properties.StylePropertyMock

     * been specified is correctly inherited from the parent values.
     */
    public void testImplicitlyInherited() {

        // The implicitly inherited property.
        final StylePropertyMock propertyMock =
                PropertiesTestHelper.createStylePropertyMock(
                        expectations, "propertyMock", true, false);
        final StyleValue outputValue = StyleKeywords.ACCEPT;

        // =====================================================================
View Full Code Here

Examples of com.volantis.styling.properties.StylePropertyMock

     * Test that a property that can be computed is.
     */
    public void testComputed() {

        // The implicitly inherited property.
        final StylePropertyMock propertyMock =
                PropertiesTestHelper.createStylePropertyMock(
                        expectations, "propertyMock", false, true);
        final StyleValue outputValue = StyleKeywords.RIGHT;

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

        PropertiesTestHelper.addExpectations(
                expectations, definitionsMock,
                new StylePropertyMock[]{
                    propertyMock,
                });

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

                // Test that computed value works:
                // -------------------------------------

                // The implicitly inherited property has already been set up to
                // indicate that it automatically inherits.

                // No value was specified.
                valuesMock.expects.getSpecifiedValue(propertyMock)
                        .returns(null);

                // Get the initial value from the retriever.
                initialValueFinderMock.expects
                        .getInitialValue(valuesMock,
                                propertyMock.getStandardDetails())
                        .returns(outputValue);

                // Set the computed value.
                valuesMock.expects.setComputedValue(
                        propertyMock, outputValue);
View Full Code Here

Examples of com.volantis.styling.properties.StylePropertyMock

     * up the correct value from its parent.
     */
    public void testExplicitlyInherited() {

        // The explicitly inherited property.
        final StylePropertyMock propertyMock =
                PropertiesTestHelper.createStylePropertyMock(
                        expectations, "propertyMock");
        final StyleValue outputValue = StyleKeywords.ACCEPT;
        final StyleInherit inheritValue = STYLE_VALUE_FACTORY.getInherit();

View Full Code Here

Examples of com.volantis.styling.properties.StylePropertyMock

     * automatically inherited picks up the initial value properly.
     */
    public void testInitialValueWorks() {

        // The initialised property.
        final StylePropertyMock initialisedPropertyMock =
                PropertiesTestHelper.createStylePropertyMock(
                        expectations, "initialisedPropertyMock", false, false);
        final StyleValue initialisedValue = StyleKeywords.ARMENIAN;

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

        PropertiesTestHelper.addExpectations(
                expectations, definitionsMock,
                new StylePropertyMock[]{
                    initialisedPropertyMock
                });

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

                // Test that initial values work.
                // --------------------------------------

                // The initialised property has already been set up to indicate
                // that it does not automatically inherit.

                // No value was specified.
                valuesMock.expects.getSpecifiedValue(initialisedPropertyMock)
                        .returns(null);

                // Get the initial value from the retriever.
                initialValueFinderMock.expects
                        .getInitialValue(valuesMock,
                                initialisedPropertyMock.getStandardDetails())
                        .returns(initialisedValue);

                // Set the computed value.
                valuesMock.expects.setComputedValue(
                        initialisedPropertyMock, initialisedValue);
View Full Code Here

Examples of com.volantis.styling.properties.StylePropertyMock

     * initial value.
     */
    public void testNormalValueWorks() {

        // The specified property.
        final StylePropertyMock specifiedPropertyMock =
                PropertiesTestHelper.createStylePropertyMock(
                        expectations, "specifiedPropertyMock", false, false);

        // The value that was specified.
        final StyleValue specifiedValueMock = StyleKeywords.BASELINE;
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.