package com.github.fhtw.swp.tutorium;

import java.util.Arrays;
import java.util.function.IntFunction;

import static com.github.fhtw.swp.tutorium.Pattern.*;

public enum Exercise {
    UE1(OBSERVER, SINGLETON, COMMAND),
    UE2(),
    UE3();

    private final Pattern[] patterns;

    Exercise(Pattern... patterns) {
        this.patterns = patterns;
    }

    public Class<?>[] getTestClasses() {
        return Arrays.stream(patterns).map(Pattern::getTestClass).toArray((IntFunction<Class<?>[]>) Class[]::new);
    }
}

@@ -222,16 +222,25 @@
     UE2(
+COMPOSITE
 ),%0A    U

add composite pattern to UE2