Package org.carrot2.util.attribute

Examples of org.carrot2.util.attribute.BindableDescriptor


    private void checkImagePathVariableIncorrect(String path)
    {
        assertNotNull(SpriteImageDirective.parse("sprite: sprite; sprite-image: url('"
            + path + "')", messageLog));
        assertThat(messages).contains(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.MALFORMED_SPRITE_IMAGE_PATH, null, 0, path));
    }
View Full Code Here


    {
        assertNotNull(SpriteImageDirective.parse(
            "sprite: sprite; sprite-image: url('../img/${" + variable + "}.png')",
            messageLog));
        assertThat(messages).contains(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_VARIABLE_IN_SPRITE_IMAGE_PATH, null, 0,
                variable));
    }
View Full Code Here

    @Test
    public void testUidDate()
    {
        checkUidType("sprite-image-uid: date", SpriteUidType.DATE);
        assertThat(messages).contains(
            new Message(MessageLevel.DEPRECATION,
                MessageType.DEPRECATED_SPRITE_IMAGE_UID, null, 0, "date"));
    }
View Full Code Here

    @Test
    public void testUidMd5()
    {
        checkUidType("sprite-image-uid: md5", SpriteUidType.MD5);
        assertThat(messages).contains(
            new Message(MessageLevel.DEPRECATION,
                MessageType.DEPRECATED_SPRITE_IMAGE_UID, null, 0, "md5"));
    }
View Full Code Here

    @Test
    public void testUidUnknown()
    {
        checkUidType("sprite-image-uid: unknown", SpriteUidType.NONE);
        assertThat(messages).contains(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_UID_TYPE, null, 0, "unknown"));
    }
View Full Code Here

            "sprite-image: url('../sprite.png')", messageLog);

        assertNull(directive);

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

            "sprite: sprite;", messageLog);

        assertNull(directive);

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

        assertEquals(directive.format, SpriteImageDirective.SpriteImageFormat.PNG);
        assertEquals(directive.layout, SpriteImageDirective.SpriteImageLayout.VERTICAL);

        assertThat(messages)
            .isEquivalentTo(
                new Message(Message.MessageLevel.WARN,
                    Message.MessageType.CANNOT_DETERMINE_IMAGE_FORMAT, null, 0,
                    "../sprite."));
    }
View Full Code Here

        assertEquals(directive.imagePath, "../sprite.jpgx");
        assertEquals(directive.format, SpriteImageDirective.SpriteImageFormat.PNG);
        assertEquals(directive.layout, SpriteImageDirective.SpriteImageLayout.VERTICAL);

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

        assertEquals(directive.imagePath, "../sprite.jpg");
        assertEquals(directive.format, SpriteImageDirective.SpriteImageFormat.JPG);
        assertEquals(directive.layout, SpriteImageDirective.SpriteImageLayout.VERTICAL);

        assertThat(messages).isEquivalentTo(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_LAYOUT, null, 0, "other"));
    }
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.