Package org.auraframework.impl.adapter.format.css

Examples of org.auraframework.impl.adapter.format.css.StyleDefCSSFormatAdapter.writeCollection()


        desc3.getDef();

        assertEquals("did not expect plugin to run at runtime", 0, observer.count);

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();
        cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef(), desc3.getDef()),
                new StringBuilder());

        assertEquals("expected the same plugin instance to once for each styledef", 3, observer.count);
    }
View Full Code Here


        prepare(new DuplicateFontFacePlugin());
        DefDescriptor<StyleDef> desc1 = addStyleDef("@font-face {font-family: Custom1; src: url(Custom1.woff)}");
        DefDescriptor<StyleDef> desc2 = addStyleDef("@font-face {font-family: Custom2; src: url(Custom2.woff)}");

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();
        cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef()), out);
        // no error
    }

    public void testErrorsOnDupeFontsSameFile() throws Exception {
        prepare(new DuplicateFontFacePlugin());
View Full Code Here

        DefDescriptor<StyleDef> desc = addStyleDef(s + "\n" + s);

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();

        try {
            cssFormatAdapter.writeCollection(Lists.newArrayList(desc.getDef()), out);
            fail("expected to get exception");
        } catch (Exception e) {
            checkExceptionContains(e, AuraRuntimeException.class, "was already declared");
        }
    }
View Full Code Here

        DefDescriptor<StyleDef> desc3 = addStyleDef("@font-face {font-family: Custom1; src: url(Custom1.woff)}");

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();

        try {
            cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef(), desc3.getDef()), out);
            fail("expected to get exception");
        } catch (Exception e) {
            checkExceptionContains(e, AuraRuntimeException.class, "was already declared");
        }
    }
View Full Code Here

        DefDescriptor<StyleDef> desc2 = addStyleDef("@font-face {font-family: \"Custom1\"; src: url(Custom1.woff)}");

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();

        try {
            cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef()), out);
            fail("expected to get exception");
        } catch (Exception e) {
            checkExceptionContains(e, AuraRuntimeException.class, "was already declared");
        }
    }
View Full Code Here

        DefDescriptor<StyleDef> desc2 = addStyleDef("@font-face {font-family: \"Custom1\"; src: url(Custom1.woff)}");

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();

        try {
            cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef()), out);
            fail("expected to get exception");
        } catch (Exception e) {
            checkExceptionContains(e, AuraRuntimeException.class, "was already declared");
        }
    }
View Full Code Here

        DefDescriptor<StyleDef> desc2 = addStyleDef("@font-face {font-family: Custom1; font-weight:bold; src: url(Custom1.woff)}");

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();

        try {
            cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef()), out);
            fail("expected to get exception");
        } catch (Exception e) {
            checkExceptionContains(e, AuraRuntimeException.class, "was already declared");
        }
    }
View Full Code Here

        DefDescriptor<StyleDef> desc2 = addStyleDef("@font-face {font-family: Custom1; font-weight:bold; src: url(Custom1.woff)}");

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();

        try {
            cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef()), out);
            fail("expected to get exception");
        } catch (Exception e) {
            checkExceptionContains(e, AuraRuntimeException.class, "was already declared");
        }
    }
View Full Code Here

        DefDescriptor<StyleDef> desc1 = addStyleDef("@font-face {font-family: Custom1; font-weight:bold; src: url(Custom1.woff)}");
        DefDescriptor<StyleDef> desc2 = addStyleDef("@font-face {font-family: Custom1; font-style:italic; src: url(Custom1.woff)}");

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();

        cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef()), out);
        // no error
    }

    public void testDifferentPropsCheckAllOff() throws Exception {
        prepare(new DuplicateFontFacePlugin(false, false));
View Full Code Here

        DefDescriptor<StyleDef> desc2 = addStyleDef("@font-face {font-family: Custom1; font-style:italic; src: url(Custom1.woff)}");

        StyleDefCSSFormatAdapter cssFormatAdapter = new StyleDefCSSFormatAdapter();

        try {
            cssFormatAdapter.writeCollection(Lists.newArrayList(desc1.getDef(), desc2.getDef()), out);
            fail("expected to get exception");
        } catch (Exception e) {
            checkExceptionContains(e, AuraRuntimeException.class, "was already declared");
        }
    }
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.