Package org.carrot2.util.httpclient

Examples of org.carrot2.util.httpclient.HttpUtils$Response


    public void testUnbalancedQuotes()
    {
        assertEquals(null, CssSyntaxUtils.unpackUrl("url('test/img/t.png\")", messageLog));

        assertThat(messages).isEquivalentTo(
            new Message(Message.MessageLevel.WARN, Message.MessageType.MALFORMED_URL,
                null, 0, "url('test/img/t.png\")"));
    }
View Full Code Here


    public void testMalformedPrefix()
    {
        assertEquals(null, CssSyntaxUtils.unpackUrl("urlx('test/img/t.png')", messageLog));

        assertThat(messages).isEquivalentTo(
            new Message(Message.MessageLevel.WARN, Message.MessageType.MALFORMED_URL,
                null, 0, "urlx('test/img/t.png')"));
    }
View Full Code Here

    public void testInvalidCssColor()
    {
        assertEquals(null, parseCssColor("cafe01"));
        assertThat(messages)
            .isEquivalentTo(
                new Message(MessageLevel.WARN, MessageType.MALFORMED_COLOR, null, 0,
                    "cafe01"));
    }
View Full Code Here

    public void testShortCssColor()
    {
        // Currently unsupported
        assertEquals(null, parseCssColor("#fff"));
        assertThat(messages).isEquivalentTo(
            new Message(MessageLevel.WARN, MessageType.MALFORMED_COLOR, null, 0, "#fff"));
    }
View Full Code Here

            "sprite-ref: spritex", SPRITE_IMAGE_DIRECTIVES, messageLog);

        assertNull(directive);

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

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

        assertThat(messages).isEquivalentTo(
            new Message(Message.MessageLevel.WARN,
                Message.MessageType.UNSUPPORTED_ALIGNMENT, null, 0, "repeat-x"));
    }
View Full Code Here

        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

TOP

Related Classes of org.carrot2.util.httpclient.HttpUtils$Response

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.