1 package org.kuali.common.jute.project; 2 3 import static com.google.common.collect.Iterables.concat; 4 import static com.google.common.collect.Lists.newArrayList; 5 import static com.google.inject.Guice.createInjector; 6 import static java.util.Arrays.asList; 7 8 import java.util.List; 9 10 import org.kuali.common.jute.project.maven.KualiJuteModule; 11 import org.kuali.common.jute.project.maven.ProjectModule; 12 13 import com.google.common.collect.ImmutableList; 14 import com.google.inject.AbstractModule; 15 import com.google.inject.Injector; 16 17 public final class UnitTestInjection { 18 19 private UnitTestInjection() {} 20 21 public static List<AbstractModule> getUnitTestModules() { 22 List<AbstractModule> list = newArrayList(); 23 list.addAll(newArrayList(new BasicModuleProvider().get())); 24 list.add(new KualiJuteModule()); 25 list.add(new ProjectModule()); 26 return ImmutableList.copyOf(list); 27 } 28 29 public static Injector createUnitTestInjector() { 30 return createInjector(concat(new BasicModuleProvider().get(), asList(new KualiJuteModule(), new ProjectModule()))); 31 } 32 }