public void testSamePropsBothHaveAnnotationButNotAllowed() throws Exception {
prepare(new DuplicateFontFacePlugin(false, false));
DefDescriptor<StyleDef> desc1 = addStyleDef("@font-face {/* @allowDuplicate */ font-family: Custom1; font-weight:bold; src: url(Custom1.woff)}");
DefDescriptor<StyleDef> desc2 = addStyleDef("@font-face {/* @allowDuplicate */ 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");
}
}