Package org.carrot2.util.attribute

Examples of org.carrot2.util.attribute.BindableDescriptor


        assertEquals(0, directive.spriteLayoutProperties.marginRight);
        assertEquals(0, directive.spriteLayoutProperties.marginTop);
        assertEquals(0, directive.spriteLayoutProperties.marginBottom);

        assertThat(messages).isEquivalentTo(
            new Message(Message.MessageLevel.WARN, message, null, 0, alignment));
    }
View Full Code Here


        assertEquals(20, directive.spriteLayoutProperties.marginRight);
        assertEquals(30, directive.spriteLayoutProperties.marginTop);
        assertEquals(40, directive.spriteLayoutProperties.marginBottom);

        assertThat(messages).isEquivalentTo(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.CANNOT_PARSE_MARGIN_VALUE, null, 0, "10zpx"));
    }
View Full Code Here

        assertNotNull(directive);
        assertEquals("vsprite", directive.spriteRef);

        assertThat(messages).isEquivalentTo(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_PROPERTIES_FOUND, null, 0,
                "sprites-alignment, sprites-margin-left"));
    }
View Full Code Here

        assertEquals(20, directive.spriteLayoutProperties.marginRight);
        assertEquals(30, directive.spriteLayoutProperties.marginTop);
        assertEquals(0, directive.spriteLayoutProperties.marginBottom);

        assertThat(messages).contains(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IGNORING_NEGATIVE_MARGIN_VALUE, null, 0,
                "sprite-margin-left"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IGNORING_NEGATIVE_MARGIN_VALUE, null, 0,
                "sprite-margin-bottom"));
    }
View Full Code Here

        assertEquals(null, spriteDirectiveOccurrenceCollector
            .extractSpriteReferenceCssProperty(css));

        assertThat(messages)
            .isEquivalentTo(
                new Message(
                    Message.MessageLevel.WARN,
                    Message.MessageType.NO_BACKGROUND_IMAGE_RULE_NEXT_TO_SPRITE_REFERENCE_DIRECTIVE,
                    null, 0, css));
    }
View Full Code Here

        assertEquals(null, spriteDirectiveOccurrenceCollector
            .extractSpriteReferenceCssProperty(css));

        assertThat(messages)
            .isEquivalentTo(
                new Message(
                    Message.MessageLevel.WARN,
                    Message.MessageType.MORE_THAN_ONE_RULE_NEXT_TO_SPRITE_REFERENCE_DIRECTIVE,
                    null, 0, css));
    }
View Full Code Here

            new Dimension(18, 17 + 6 + 5));

        // The unsatisfied sprite references are not removed from the output
        // file, hence we have two warnings
        assertThat(messages).contains(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.CANNOT_NOT_LOAD_IMAGE, new File(testDir,
                    "css/style.css").getPath(), 15,
                new File(testDir, "img/logo.png").getPath(), "Can't read input file!"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.CANNOT_NOT_LOAD_IMAGE, new File(testDir,
                    "css/style-expected.css").getPath(), 15, new File(testDir,
                    "img/logo.png").getPath(), "Can't read input file!"));
    }
View Full Code Here

        assertThat(processedCss()).hasSameContentAs(expectedCss());
        assertThat(new File(testDir, "img/sprite.png")).doesNotExist();

        assertThat(messages).contains(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_INDIVIDUAL_IMAGE_FORMAT, new File(
                    testDir, "css/style.css").getPath(), 8, new File(testDir,
                    "img/web.iff").getPath()));
    }
View Full Code Here

            new Dimension(48, 16 + 17 + 47));

        final String styleCssPath = new File(testDir, "css/style.css").getPath();
        assertThat(messages).isEquivalentTo(
            Message.MessageLevel.WARN,
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_PROPERTIES_FOUND, styleCssPath, 4,
                "sprites-layout"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_PROPERTIES_FOUND, styleCssPath, 14,
                "sprites-margin-top"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_PROPERTIES_FOUND, styleCssPath, 18,
                "sprites-alignment"));
    }
View Full Code Here

            new Dimension(17 + 15 + 48, 47));

        final String styleCssPath = new File(testDir, "css/style.css").getPath();
        assertThat(messages).isEquivalentTo(
            Message.MessageLevel.WARN,
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.OVERRIDING_PROPERTY_FOUND, styleCssPath, 10,
                "background-image", 9),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.OVERRIDING_PROPERTY_FOUND, styleCssPath, 21,
                "background-position", 20));
    }
View Full Code Here

TOP

Related Classes of org.carrot2.util.attribute.BindableDescriptor

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.