Package com.puppycrawl.tools.checkstyle

Examples of com.puppycrawl.tools.checkstyle.DefaultConfiguration


    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
                createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig,
                getPath("grammars/java8/InputDefaultMethodsTest.java"),
                expected);
View Full Code Here


    @Test
    public void testSwitch()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
                createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig,
                getPath("grammars/java8/InputDefaultMethodsTest2.java"),
                expected);
View Full Code Here

    private final String MSG = getCheckMessage("forbid.escaped.unicode.char");

    @Test
    public void testDefault() throws Exception
    {
        DefaultConfiguration checkConfig =
                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
        final String[] expected = {
            "5: " + MSG,
            "7: " + MSG,
            "9: " + MSG,
View Full Code Here

    }

    @Test
    public void testAllowEscapesForControlCharacterst() throws Exception
    {
        DefaultConfiguration checkConfig =
                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
        checkConfig.addAttribute("allowEscapesForControlCharacters", "true");
        final String[] expected = {
            "5: " + MSG,
            "7: " + MSG,
            "9: " + MSG,
            "13: " + MSG,
View Full Code Here

    }

    @Test
    public void testAllowByTailComment() throws Exception
    {
        DefaultConfiguration checkConfig =
                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
        checkConfig.addAttribute("allowByTailComment", "true");
        final String[] expected = {
            "5: " + MSG,
            "13: " + MSG,
            "21: " + MSG,
            "27: " + MSG,
View Full Code Here

    }

    @Test
    public void testAllowAllCharactersEscaped() throws Exception
    {
        DefaultConfiguration checkConfig =
                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
        checkConfig.addAttribute("allowIfAllCharactersEscaped", "true");
        final String[] expected = {
            "5: " + MSG,
            "7: " + MSG,
            "9: " + MSG,
            "13: " + MSG,
View Full Code Here

    }

    @Test
    public void allowNonPrintableEscapes() throws Exception
    {
        DefaultConfiguration checkConfig =
                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
        checkConfig.addAttribute("allowNonPrintableEscapes", "true");
        final String[] expected = {
            "5: " + MSG,
            "7: " + MSG,
            "9: " + MSG,
            "13: " + MSG,
View Full Code Here

    @Test
    public void testSimpleTypeAnnotation()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
                createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig,
                getPath("grammars/java8/InputAnnotationsTest1.java"), expected);
View Full Code Here

{
    @Test
    public void testJavaStyle()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(ArrayTypeStyleCheck.class);
        final String[] expected = {
            "14:23: Array brackets at illegal position.",
            "20:44: Array brackets at illegal position.",
        };
View Full Code Here

    @Test
    public void testAnnotationOnClass()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
                createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig,
                getPath("grammars/java8/InputAnnotationsTest2.java"), expected);
View Full Code Here

TOP

Related Classes of com.puppycrawl.tools.checkstyle.DefaultConfiguration

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.