AutomaticBeanTest.java :  » Code-Analyzer » checkstyle-5.1 » com » puppycrawl » tools » checkstyle » api » Java Open Source

Java Open Source » Code Analyzer » checkstyle 5.1 
checkstyle 5.1 » com » puppycrawl » tools » checkstyle » api » AutomaticBeanTest.java
package com.puppycrawl.tools.checkstyle.api;

import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
import org.junit.Test;

public class AutomaticBeanTest
{
    private static class TestBean extends AutomaticBean
    {
        public void setName(String aName)
        {
        }
    }

    private final DefaultConfiguration mConf = new DefaultConfiguration(
            "testConf");

    TestBean mTestBean = new TestBean();

    @Test(expected = CheckstyleException.class)
    public void testNoSuchAttribute() throws CheckstyleException
    {
        mConf.addAttribute("NonExisting", "doesn't matter");
        mTestBean.configure(mConf);
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.