KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > metrics > BooleanExpressionComplexityCheckTest


1 package com.puppycrawl.tools.checkstyle.checks.metrics;
2
3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
5
6 import java.io.File JavaDoc;
7
8 public class BooleanExpressionComplexityCheckTest extends BaseCheckTestCase
9 {
10     public void test() throws Exception JavaDoc {
11         DefaultConfiguration checkConfig =
12             createCheckConfig(BooleanExpressionComplexityCheck.class);
13
14         String JavaDoc[] expected = {
15             "13:9: Boolean expression complexity is 4 (max allowed is 3).",
16         };
17
18         verify(checkConfig, getPath("metrics" + File.separator + "BooleanExpressionComplexityCheckTestInput.java"), expected);
19     }
20 }
21
Popular Tags