// Path: src/main/java/com/insightfullogic/multiinherit/api/MultiModule.java
// public class MultiModule extends AbstractModule {
// 
// 	private final Class<?>[] classes;
// 	private final boolean useGeneration;
// 	private final boolean dumpClasses;
// 
// 	public MultiModule(final boolean useGeneration, final Class<?>... classes) {
// 		this(useGeneration, false, classes);
// 	}
// 
// 	public MultiModule(final boolean useGeneration, final boolean dumpClasses, final Class<?>... classes) {
// 		if (!useGeneration && dumpClasses) {
// 			throw new IllegalArgumentException("You cannot dump the generate class files if you're not generating class files");
// 		}
// 		this.classes = classes;
// 		this.useGeneration = useGeneration;
// 		this.dumpClasses = dumpClasses;
// 	}
// 
// 	@SuppressWarnings({ "rawtypes", "unchecked" })
// 	private void bindMulti(final Class<?>... classes) {
// 		if (useGeneration) {
// 			bind(MultiInjector.class).to(GenerationMultiInjector.class);
// 			bind(Boolean.class).annotatedWith(Names.named("dump")).toInstance(dumpClasses);
// 		} else {
// 			bind(MultiInjector.class).to(ReflectionMultiInjector.class);
// 		}
// 		for (final Class cls : classes) {
// 			bind(cls).toProvider(new MultiProvider(cls));
// 		}
// 	}
// 
// 	@Override
// 	protected void configure() {
// 		bindMulti(classes);
// 	}
// 
// }


import junit.framework.Assert;
import org.junit.Test;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.insightfullogic.multiinherit.api.MultiModule;
package com.insightfullogic.multiinherit.generics;




public class TestGenericCases {

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@Test
	public void simpleCases() {
		final Injector injector = Guice.createInjector(new MultiModule(true, GenericCombined.class));
		final GenericCombined inst = injector.getInstance(GenericCombined.class);
		Assert.assertEquals(1, inst.a(1));
		Assert.assertEquals(1, inst.b(1));

		final GenericCombined<Integer, Integer> casted = injector.getInstance(GenericCombined.class);
		final Integer one = new Integer(1);
		Assert.assertEquals(one, casted.a(1));
		Assert.assertEquals(one, casted.b(1));
	}

	@Test
	public void singleTrait() {
// Path: src/main/java/com/insightfullogic/multiinherit/api/MultiModule.java
// public class MultiModule extends AbstractModule {
// 
// 	private final Class<?>[] classes;
// 	private final boolean useGeneration;
// 	private final boolean dumpClasses;
// 
// 	public MultiModule(final boolean useGeneration, final Class<?>... classes) {
// 		this(useGeneration, false, classes);
// 	}
// 
// 	public MultiModule(final boolean useGeneration, final boolean dumpClasses, final Class<?>... classes) {
// 		if (!useGeneration && dumpClasses) {
// 			throw new IllegalArgumentException("You cannot dump the generate class files if you're not generating class files");
// 		}
// 		this.classes = classes;
// 		this.useGeneration = useGeneration;
// 		this.dumpClasses = dumpClasses;
// 	}
// 
// 	@SuppressWarnings({ "rawtypes", "unchecked" })
// 	private void bindMulti(final Class<?>... classes) {
// 		if (useGeneration) {
// 			bind(MultiInjector.class).to(GenerationMultiInjector.class);
// 			bind(Boolean.class).annotatedWith(Names.named("dump")).toInstance(dumpClasses);
// 		} else {
// 			bind(MultiInjector.class).to(ReflectionMultiInjector.class);
// 		}
// 		for (final Class cls : classes) {
// 			bind(cls).toProvider(new MultiProvider(cls));
// 		}
// 	}
// 
// 	@Override
// 	protected void configure() {
// 		bindMulti(classes);
// 	}
// 
// }


// Path: src/test/java/com/insightfullogic/multiinherit/generics/TestGenericCases.java
import junit.framework.Assert;
import org.junit.Test;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.insightfullogic.multiinherit.api.MultiModule;

package com.insightfullogic.multiinherit.generics;




public class TestGenericCases {

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@Test
	public void simpleCases() {
		final Injector injector = Guice.createInjector(new MultiModule(true, GenericCombined.class));
		final GenericCombined inst = injector.getInstance(GenericCombined.class);
		Assert.assertEquals(1, inst.a(1));
		Assert.assertEquals(1, inst.b(1));

		final GenericCombined<Integer, Integer> casted = injector.getInstance(GenericCombined.class);
		final Integer one = new Integer(1);
		Assert.assertEquals(one, casted.a(1));
		Assert.assertEquals(one, casted.b(1));
	}

	@Test
	public void singleTrait() {
		final Injector injector = Guice.createInjector(new MultiModule(true, GenericCombinedTrait.class));