package com.codingchili.core.benchmarking;

import com.codingchili.core.context.CoreContext;

import java.util.List;

/**
 * @author Robin Duda
 * <p>
 * Mock implementation for a benchmark group.
 */
public class MockGroupBuilder extends BenchmarkGroupBuilder {
    private boolean executed = false;
    private MockImplementationBuilder firstImplementation;
    private MockImplementationBuilder secondImplementation;

    /**
     * Creates a new mock group with two mock implementations.
     *
     * @param context    used to execute asynchronous benchmarks.
     * @param name       the handler of the group
     * @param iterations number of iterations to perform
     */
    public MockGroupBuilder(CoreContext context, String name, int iterations) {
        super(name, iterations);
        firstImplementation = new MockImplementationBuilder(context, this, "implementation#1");
        secondImplementation = new MockImplementationBuilder(context, this, "implementation#2");
        getImplementations().add(firstImplementation);
        getImplementations().add(secondImplementation);
    }

    @Override
    public List<BenchmarkImplementation> getImplementations() {
        executed = true;
        return super.getImplementations();
    }

    public MockImplementationBuilder getFirstImplementation() {
        return firstImplementation;
    }

    public MockImplementationBuilder getSecondImplementation() {
        return secondImplementation;
    }

    public boolean isExecuted() {
        return executed;
    }
}

@@ -37,16 +37,46 @@
 rking;%0A%0A
+import java.util.Collection;%0A%0A
 import c
@@ -121,32 +121,8 @@
 t;%0A%0A
-import java.util.List;%0A%0A
 /**%0A
@@ -1132,12 +1132,18 @@
 lic 
-List
+Collection
 %3CBen

Fix compilation issue in MockGroupBuilder.