Package org.carrot2.util.attribute

Examples of org.carrot2.util.attribute.BindableDescriptor


//        assertThat(messages).doesNotHaveMessagesOfLevel(MessageLevel.WARN);

        assertThat(messages).isEquivalentTo(
            Message.MessageLevel.WARN,
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IMAGE_FRACTIONAL_SCALE_VALUE, null, 8, "../img/web.gif",
                8.5f, 8.5f),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.FRACTIONAL_SCALE_VALUE, null, 8, "absolute",
                8.5f, 8.5f));

        org.carrot2.util.FileUtils.deleteThrowingExceptions(absoluteSpriteFile);
    }
View Full Code Here


            .assertThat(sprite(testDir, "img/sprite-many-colors.png")).isIndexedColor()
            .doesNotHaveAlpha();

        assertThat(messages).isEquivalentTo(
            Message.MessageLevel.WARN,
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.ALPHA_CHANNEL_LOSS_IN_INDEXED_COLOR, null, 25,
                "full-alpha"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.USING_WHITE_MATTE_COLOR_AS_DEFAULT, null, 25,
                "full-alpha"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.TOO_MANY_COLORS_FOR_INDEXED_COLOR, null, 32,
                "many-colors", 293, 255));
    }
View Full Code Here

            .assertThat(sprite(testDir, "img/sprite-many-colors.png")).isDirectColor()
            .doesNotHaveAlpha();

        assertThat(messages).isEquivalentTo(
            Message.MessageLevel.WARN,
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IGNORING_MATTE_COLOR_NO_SUPPORT, null, 12,
                "full-alpha-m1"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IGNORING_MATTE_COLOR_NO_SUPPORT, null, 19,
                "full-alpha-m2"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IGNORING_MATTE_COLOR_NO_SUPPORT, null, 26,
                "full-alpha-m3"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IGNORING_MATTE_COLOR_NO_PARTIAL_TRANSPARENCY, null,
                33, "bit-alpha"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IGNORING_MATTE_COLOR_NO_SUPPORT, null, 40,
                "many-colors"));
    }
View Full Code Here

            .assertThat(sprite(testDir, "img/sprite-many-colors.png")).isIndexedColor()
            .doesNotHaveAlpha();

        assertThat(messages).isEquivalentTo(
            Message.MessageLevel.WARN,
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.ALPHA_CHANNEL_LOSS_IN_INDEXED_COLOR, null, 12,
                "full-alpha-m1"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.ALPHA_CHANNEL_LOSS_IN_INDEXED_COLOR, null, 19,
                "full-alpha-m2"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.ALPHA_CHANNEL_LOSS_IN_INDEXED_COLOR, null, 26,
                "full-alpha-m3"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.IGNORING_MATTE_COLOR_NO_PARTIAL_TRANSPARENCY, null,
                33, "bit-alpha"),
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.TOO_MANY_COLORS_FOR_INDEXED_COLOR, null, 40,
                "many-colors", 293, 255));
    }
View Full Code Here

        assertThat(processedCss()).hasSameContentAs(expectedCss());

        assertThat(messages).doesNotHaveMessagesOfLevel(MessageLevel.WARN);
        assertThat(messages).isEquivalentTo(
            Message.MessageLevel.IE6NOTICE,
            new Message(Message.MessageLevel.IE6NOTICE,
                Message.MessageType.ALPHA_CHANNEL_LOSS_IN_INDEXED_COLOR, null, 27,
                "full-alpha"),
            new Message(Message.MessageLevel.IE6NOTICE,
                Message.MessageType.USING_WHITE_MATTE_COLOR_AS_DEFAULT, null, 27,
                "full-alpha"),
            new Message(Message.MessageLevel.IE6NOTICE,
                Message.MessageType.TOO_MANY_COLORS_FOR_INDEXED_COLOR, null, 41,
                "many-colors-bit-alpha", 293, 255));
    }
View Full Code Here

            VERTICAL_SPRITE_IMAGE_DIRECTIVE_WITH_LAYOUT);

    @Test
    public void testEmpty()
    {
        final MessageLog messageLog = new MessageLog();
        final SpriteReferenceDirective directive = SpriteReferenceDirective.parse("",
            SPRITE_IMAGE_DIRECTIVES, messageLog);
        assertNull(directive);
    }
View Full Code Here

    }

    @Test
    public void testSpriteRefOnly()
    {
        final MessageLog messageLog = new MessageLog();
        final SpriteReferenceDirective directive = SpriteReferenceDirective.parse(
            "sprite-ref: vsprite", SPRITE_IMAGE_DIRECTIVES, messageLog);

        assertNotNull(directive);
        assertEquals("vsprite", directive.spriteRef);
View Full Code Here

    }

    @Test
    public void testSpriteRefOnlyHorizontalImage()
    {
        final MessageLog messageLog = new MessageLog();
        final SpriteReferenceDirective directive = SpriteReferenceDirective.parse(
            "sprite-ref: hsprite", SPRITE_IMAGE_DIRECTIVES, messageLog);

        assertNotNull(directive);
        assertEquals("hsprite", directive.spriteRef);
View Full Code Here

    }

    @Test
    public void testSpriteRefAlignment()
    {
        final MessageLog messageLog = new MessageLog();
        final SpriteReferenceDirective directive = SpriteReferenceDirective.parse(
            "sprite-ref: vsprite; sprite-alignment: repeat", SPRITE_IMAGE_DIRECTIVES,
            messageLog);

        assertNotNull(directive);
View Full Code Here

    /**
     * Creates a {@link SpriteBuilder} with the provided parameters and log.
     */
    public SpriteBuilder(SmartSpritesParameters parameters, MessageLog messageLog)
    {
        this(parameters, messageLog, new FileSystemResourceHandler(
            parameters.getDocumentRootDir(), parameters.getCssFileEncoding(), messageLog));
    }
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.