package io.github.tatools.sunshine.core;

import java.util.List;

/**
 * @author Dmytro Serdiuk (dmytro.serdiuk@gmail.com)
 * @version $Id$
 * @since 0.1
 */
public final class SunshineSuitePrintable implements SunshineSuite {

    private final SunshineSuite sunshineSuite;

    public SunshineSuitePrintable(SunshineSuite sunshineSuite) {
        this.sunshineSuite = sunshineSuite;
    }

    @Override
    public List<SunshineTest> tests() throws SuiteException {
        System.out.println("Sunshine suite contains the following tests:");
        this.sunshineSuite.tests().forEach(System.out::println);
        return this.sunshineSuite.tests();
    }
}

@@ -473,75 +473,322 @@
     
-System.out.println(%22Sunshine suite contains the following tests:
+final List%3CSunshineTest%3E tests = this.sunshineSuite.tests();%0A        final StringBuilder message = new StringBuilder();%0A        message.append(%22Sunshine found %22)%0A                .append(tests.size())%0A                .append(%22 classes by the specified pattern. They all will be passed to appropriate xUnit engine.
 %22)
-;
 %0A   
@@ -796,34 +796,52 @@
     
-this.sunshineSuite.
+        .append(%22%5CnClasses:%22);%0A        
 tests
-()
 .for
@@ -845,16 +845,64 @@
 forEach(
+c -%3E message.append(%22%5Cn- %22).append(c));%0A        
 System.o
@@ -907,17 +907,24 @@
 .out
-::
+.
 println
+(message
 );%0A 
@@ -941,34 +941,13 @@
 urn 
-this.sunshineSuite.
 tests
-()
 ;%0A  

Print found classes count and their names