Commit 54887781 authored by Robert Chatley's avatar Robert Chatley
Browse files

Initial files for exercise

mvn clean test cobertura:cobertura cobertura:check checkstyle:checkstyle checkstyle:check
<?xml version="1.0"?>
The contents of this file are subject to the terms
of the Common Development and Distribution License
(the License). You may not use this file except in
compliance with the License.
You can obtain a copy of the license at
See the License for the specific language governing
permissions and limitations under the License.
When distributing Covered Code, include this CDDL
Header Notice in each file and include the License file
If applicable, add the following below the CDDL Header,
with the fields enclosed by brackets [] replaced by
you own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
- the Sun Code Conventions at
- the Javadoc guidelines at
- the JDK Api documentation
- some best practices
Checkstyle is very configurable. Be sure to read the documentation at (or in your downloaded distribution).
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
Finally, it is worth reading the documentation.
<module name="Checker">
<!-- Checks for Size Violations. -->
<!-- See -->
<module name="FileLength">
<property name="max" value="150"/>
<module name="TreeWalker">
<!-- Checks for Naming Conventions. -->
<!-- See -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!-- Checks for imports -->
<!-- See -->
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="LineLength">
<property name="max" value="120"/>
<module name="MethodLength">
<property name="max" value="15"/>
<module name="ParameterNumber">
<property name="max" value="5"/>
<!-- Checks for whitespace -->
<!-- See -->
<module name="EmptyForIteratorPad">
<property name="option" value="space" />
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter" />
<module name="WhitespaceAround">
<property name="tokens"
<!-- Modifier Checks -->
<!-- See -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Checks for blocks. You know, those {}'s -->
<!-- See -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<!-- Checks for common coding problems -->
<!-- See -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<project xmlns="" xmlns:xsi=""
<name>220 CBT 1</name>
<description>TDD Exercise for 220</description>
<!-- Per-class thresholds -->
package ic.doc;
public class Example {
public int answer() {
return 42;
\ No newline at end of file
package ic.doc;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static;
public class ExampleTest {
public void canAnswerTheUniversalQuestion() {
assertThat(new Example().answer(), is(42));
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment