<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Quick Start</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>Recent changes to Quick Start</description><atom:link href="https://sourceforge.net/p/easycoverage/wiki/Quick%20Start/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 18 Mar 2013 13:47:07 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/easycoverage/wiki/Quick%20Start/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Quick Start modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -25,11 +25,10 @@
         ...
     }

-To create a test suite you are going to use the helper class `JUnitTestSuiteProvider`. This class will hold the configuration of the test suite, such as the classes under test, the checkers to use, etc. Create an instance of `JUnitTestSuiteProvider`. The constructor has an optional `String` argument, which is the name given to the test suite (if no name is given, a default name is used).
+To create a test suite you are going to use the helper class `JUnitTestSuiteProvider`. This class will hold the configuration of the test suite, such as the classes under test, the checkers to use, etc. Create an instance of `JUnitTestSuiteProvider`.

     :::Java
-        JUnitTestSuiteProvider testSuiteProvider =
-            new JUnitTestSuiteProvider("Easy Coverage Quick Start Test Suite");
+        JUnitTestSuiteProvider testSuiteProvider = new JUnitTestSuiteProvider();

 There are two ways of specifying the classes under test. You can add the classes manually using `JUnitTestSuiteProvider.addClass(Class)`, or you can use the helper class `ClassScanner`, which can scan a folder and return a set of classes (in this case use the `JUnitTestSuiteProvider.setClasses(Set&gt;)` method.

@@ -66,7 +65,9 @@
 Finally, you just need to return the test suite created by the provider:

     :::Java
-        return testSuiteProvider.getTestSuite();
+        return testSuiteProvider.getTestSuite("Easy Coverage Quick Start Test Suite");
+
+The string parameter is the name of the created JUnit suite. It is optional, and a default name will be provided if ommited.

 Your method `suite()̀  should look like this:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Mon, 18 Mar 2013 13:47:07 -0000</pubDate><guid>https://sourceforge.nete9077e68d8a5086132cb76816aab5801c657f51e</guid></item><item><title>WikiPage Quick Start modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -36,6 +36,13 @@
     :::Java
         testSuiteProvider.addClass(ClassUnderTest.class);
         testSuiteProvider.addClass(AnotherClassUnderTest.class);
+
+Or
+
+    :::Java
+        final ClassScanner scanner = new ClassScanner();
+        scanner.scanFolder(new File("path/to/src/folder"));
+        testSuiteProvider.setClasses(scanner.getClasses());

 Now you need to specify how the instances of the classes under test will be created. Easy Coverage relies on [Instance Providers]. A default one is used if none is given. You can find more information on instance providers, and how to create your own, in the instance provider documentation. In this example we will use the default one, thus we do not need to do anything.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Tue, 12 Mar 2013 11:31:12 -0000</pubDate><guid>https://sourceforge.net14f391a634be4b0454c1eac8ef594beeb9252fa8</guid></item><item><title>WikiPage Quick Start modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -1,7 +1,21 @@
 Quick Start
 ===========

-In this tutorial, we will see how to configure Easy Coverage with JUnit. First you need to configure your project to use Easy Coverage. If you are using Maven, just add dependencies to `easyCoverage4J-framework` and `easyCoverage4J-junit` (both in group `com.tocea.easycoverage`). Otherwise, just download `easycoverage-framework.jar` and `easycoverage-junit.jar` and put them in your classpath. Easy Coverage depends on [slf4j](http://www.slf4j.org/), [Logback](http://logback.qos.ch/), and of course JUnit, so be sure to include these too.
+In this tutorial, we will see how to configure Easy Coverage with JUnit. First you need to configure your project to use Easy Coverage. For Maven you can simply add it to your dependencies:
+
+    :::xml
+    
+        com.tocea.easycoverage
+        easyCoverage4J-framework
+        0.2.2
+    
+    
+        com.tocea.easycoverage
+        easyCoverage4J-junit
+        0.2.2
+    
+
+If you are using other dependency management tools (like Apache Ivy) you can look for the configuration on Maven Central for [EasyCoverage4J-framework](http://search.maven.org/#artifactdetails%7Ccom.tocea.easycoverage%7CeasyCoverage4J-framework%7C0.2.1%7Cjar) and [EasyCoverage4J-junit](http://search.maven.org/#artifactdetails%7Ccom.tocea.easycoverage%7CeasyCoverage4J-junit%7C0.2.1%7Cjar). Alternatively you can download the jars from the [files section](https://sourceforge.net/projects/easycoverage/files/Releases/). Be sure to add the jar for  [slf4j](http://www.slf4j.org/), [Logback](http://logback.qos.ch/), and JUnit in your classpath as Easycoverage depends on them.

 Now you are ready to configure your first Easy Coverage test suite. Create a new class with a unique static method `suite` that returns a TestSuite:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Tue, 12 Mar 2013 11:13:14 -0000</pubDate><guid>https://sourceforge.net06617dfd5159bb4ca7066004191d3488d30d2b9e</guid></item><item><title>WikiPage Quick Start modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>&lt;pre&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Mon, 10 Dec 2012 16:09:34 -0000</pubDate><guid>https://sourceforge.netb1e64f4fc9e842363193db53d684bb79976ae30c</guid></item><item><title>WikiPage Quick Start modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>&lt;pre&gt;--- v3
+++ v4
@@ -23,7 +23,7 @@
         testSuiteProvider.addClass(ClassUnderTest.class);
         testSuiteProvider.addClass(AnotherClassUnderTest.class);
 
-Now you need to specify how the instances of the classes under test will be created. Easy Coverage relies on [InstanceProviders]. A default one is used if none is given. You can find more information on instance providers, and how to create your own, in the instance provider documentation. In this example we will use the default one, thus we do not need to do anything.
+Now you need to specify how the instances of the classes under test will be created. Easy Coverage relies on [Instance Providers]. A default one is used if none is given. You can find more information on instance providers, and how to create your own, in the instance provider documentation. In this example we will use the default one, thus we do not need to do anything.
 
 The last configuration step is to specify the [Checkers] to use. There are two kind of checkers, class checkers and method checkers. For more information, and a list of implemented checkers, see the checkers documentation.
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Mon, 10 Dec 2012 16:06:45 -0000</pubDate><guid>https://sourceforge.net6ea7eb50acadbb87df93c4c92267a4fd09f45202</guid></item><item><title>WikiPage Quick Start modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>&lt;pre&gt;--- v2
+++ v3
@@ -76,4 +76,4 @@
 
 Just launch the test suite with your favorite JUnit runner, and you will see a list of test cases dynamically created.
 
-[[img src=easycoverage-selftest.png alt=EasyCoverage run on itself]]
+[[img src=easycoverage-selftest.png]]
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Mon, 10 Dec 2012 11:57:18 -0000</pubDate><guid>https://sourceforge.net29e8cac20adb3250bac64e0c47ed43577ec8ba16</guid></item><item><title>WikiPage Quick Start modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -75,3 +75,5 @@
     }
 
 Just launch the test suite with your favorite JUnit runner, and you will see a list of test cases dynamically created.
+
+[[img src=easycoverage-selftest.png alt=EasyCoverage run on itself]]
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Mon, 10 Dec 2012 11:55:21 -0000</pubDate><guid>https://sourceforge.net38776a5b15e467c7a9c3be2922e3154ea68f6d20</guid></item><item><title>WikiPage Quick Start modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Quick%2520Start/</link><description>Quick Start
===========

In this tutorial, we will see how to configure Easy Coverage with JUnit. First you need to configure your project to use Easy Coverage. If you are using Maven, just add dependencies to `easyCoverage4J-framework` and `easyCoverage4J-junit` (both in group `com.tocea.easycoverage`). Otherwise, just download `easycoverage-framework.jar` and `easycoverage-junit.jar` and put them in your classpath. Easy Coverage depends on [slf4j](http://www.slf4j.org/), [Logback](http://logback.qos.ch/), and of course JUnit, so be sure to include these too.

Now you are ready to configure your first Easy Coverage test suite. Create a new class with a unique static method `suite` that returns a TestSuite:

    :::Java
    @Test
    public static TestSuite suite() {
        ...
    }

To create a test suite you are going to use the helper class `JUnitTestSuiteProvider`. This class will hold the configuration of the test suite, such as the classes under test, the checkers to use, etc. Create an instance of `JUnitTestSuiteProvider`. The constructor has an optional `String` argument, which is the name given to the test suite (if no name is given, a default name is used).

    :::Java
        JUnitTestSuiteProvider testSuiteProvider =
            new JUnitTestSuiteProvider("Easy Coverage Quick Start Test Suite");

There are two ways of specifying the classes under test. You can add the classes manually using `JUnitTestSuiteProvider.addClass(Class&lt;?&gt;)`, or you can use the helper class `ClassScanner`, which can scan a folder and return a set of classes (in this case use the `JUnitTestSuiteProvider.setClasses(Set&lt;Class&lt;?&gt;&gt;)` method.

    :::Java
        testSuiteProvider.addClass(ClassUnderTest.class);
        testSuiteProvider.addClass(AnotherClassUnderTest.class);

Now you need to specify how the instances of the classes under test will be created. Easy Coverage relies on [InstanceProviders]. A default one is used if none is given. You can find more information on instance providers, and how to create your own, in the instance provider documentation. In this example we will use the default one, thus we do not need to do anything.

The last configuration step is to specify the [Checkers] to use. There are two kind of checkers, class checkers and method checkers. For more information, and a list of implemented checkers, see the checkers documentation.

    :::Java
        testSuiteProvider.addClassChecker(ToStringNotNullChecker.class);
        testSuiteProvider.addClassChecker(BijectiveCompareToChecker.class);
        testSuiteProvider.addClassChecker(BijectiveEqualsChecker.class);
        testSuiteProvider.addClassChecker(CloneChecker.class);
        testSuiteProvider.addClassChecker(NPEConstructorChecker.class);
        testSuiteProvider.addClassChecker(NullValueEqualsChecker.class);

        testSuiteProvider.addMethodChecker(NPEMethodChecker.class);
        testSuiteProvider.addMethodChecker(GetterNotNullChecker.class);
        testSuiteProvider.addMethodChecker(SetterChecker.class);
        testSuiteProvider.addMethodChecker(ArrayIndexOutOfBoundExceptionChecker.class);

You can specify on optional timeout (in ms), with the `JUnitTestSuiteProvider.setTimeout(int)` method. By default there is no timeout (the value is 0), but you can set one if need be (for instance if a bad configuration causes the method under test to freeze of loop indefinitely).

Finally, you just need to return the test suite created by the provider:

    :::Java
        return testSuiteProvider.getTestSuite();


Your method `suite()̀  should look like this:

    :::Java
    @Test
    public static TestSuite suite() {
        JUnitTestSuiteProvider testSuiteProvider =
            new JUnitTestSuiteProvider("Easy Coverage Quick Start Test Suite");

        testSuiteProvider.addClass(ClassUnderTest.class);
        testSuiteProvider.addClass(AnotherClassUnderTest.class);

        testSuiteProvider.addClassChecker(ToStringNotNullChecker.class);
        testSuiteProvider.addClassChecker(BijectiveCompareToChecker.class);
        testSuiteProvider.addClassChecker(BijectiveEqualsChecker.class);
        testSuiteProvider.addClassChecker(CloneChecker.class);
        testSuiteProvider.addClassChecker(NPEConstructorChecker.class);
        testSuiteProvider.addClassChecker(NullValueEqualsChecker.class);

        testSuiteProvider.addMethodChecker(NPEMethodChecker.class);
        testSuiteProvider.addMethodChecker(GetterNotNullChecker.class);
        testSuiteProvider.addMethodChecker(SetterChecker.class);
        testSuiteProvider.addMethodChecker(ArrayIndexOutOfBoundExceptionChecker.class);

        return testSuiteProvider.getTestSuite();
    }

Just launch the test suite with your favorite JUnit runner, and you will see a list of test cases dynamically created.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Mon, 10 Dec 2012 11:54:23 -0000</pubDate><guid>https://sourceforge.netf6c67fd6a6be9e5df5ba7d31f1d65904f4df7f15</guid></item></channel></rss>