// Path: src/main/java/de/bechte/junit/runners/context/description/ContextDescriber.java
// public class ContextDescriber extends SuiteDescriber {
//     private final ChildResolver<FrameworkMethod> methodResolver;
//     private final Describer<FrameworkMethod> methodDescriber;
// 
//     public ContextDescriber(final ChildResolver<Class<?>> contextResolver,
//             final ChildResolver<FrameworkMethod> methodResolver, final Describer<FrameworkMethod> methodDescriber) {
//         super(contextResolver);
//         this.methodResolver = methodResolver;
//         this.methodDescriber = methodDescriber;
//     }
// 
//     @Override
//     protected void addChildren(final Description description, final TestClass testClass) {
//         for (final FrameworkMethod method : methodResolver.getChildren(testClass))
//             description.addChild(methodDescriber.describe(method));
// 
//         super.addChildren(description, testClass);
//     }
// }
// 
// Path: src/test/java/de/bechte/junit/stubs/ContextTestClassStub.java
// public class ContextTestClassStub {
//     public class A {
//         @Test
//         public void innerTestMethod() throws Exception {
//         }
//     }
// 
//     public class B {
//         public class C {
//             @Test
//             public void failingTestMethod() throws Exception {
//                 fail("Failing!");
//             }
//         }
//     }
// 
//     @Test
//     public void outerTestMethod() throws Exception {
//     }
// }
// 
// Path: src/test/java/de/bechte/junit/stubs/ContextTestClassWithInheritedAbstractInnerClassStub.java
// public class ContextTestClassWithInheritedAbstractInnerClassStub {
//     public abstract class A {
//         @Before
//         public void setup() throws Exception {
//         }
// 
//         @Test
//         public void runTestTwice() throws Exception {
//         }
//     }
// 
//     public class B extends A {
//         @Test
//         public void runTestOnce() throws Exception {
//         }
//     }
// 
//     public class C extends A {
//     }
// }
// 
// Path: src/test/java/de/bechte/junit/stubs/EmptyTestClassStub.java
// public class EmptyTestClassStub {
// }
// 
// Path: src/test/java/de/bechte/junit/stubs/SimpleTestClassStub.java
// public class SimpleTestClassStub {
//     @Test
//     public void testMethod() throws Exception {
//     }
// 
//     @Test
//     public void failingTestMethod() throws Exception {
//         fail("Failing!");
//     }
// }


import de.bechte.junit.runners.context.description.ContextDescriber;
import de.bechte.junit.stubs.ContextTestClassStub;
import de.bechte.junit.stubs.ContextTestClassWithInheritedAbstractInnerClassStub;
import de.bechte.junit.stubs.EmptyTestClassStub;
import de.bechte.junit.stubs.SimpleTestClassStub;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.Description;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunNotifier;
import org.mockito.Mock;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import static org.mockito.MockitoAnnotations.initMocks;
package de.bechte.junit.runners.context.processing;



public class ContextExecutorTest {
    @Mock
    private ContextDescriber describer;

    @Mock
    private RunNotifier notifier;

    private ContextExecutor executor;

    @Before
    public void setUp() throws Exception {
        initMocks(this);

        executor = new ContextExecutor(describer);
    }

    @Test
    public void verifyNotificationsForExecutionOf_SimpleTestClass() throws Exception {
        executor.run(null, SimpleTestClassStub.class, notifier);

// Path: src/main/java/de/bechte/junit/runners/context/description/ContextDescriber.java
// public class ContextDescriber extends SuiteDescriber {
//     private final ChildResolver<FrameworkMethod> methodResolver;
//     private final Describer<FrameworkMethod> methodDescriber;
// 
//     public ContextDescriber(final ChildResolver<Class<?>> contextResolver,
//             final ChildResolver<FrameworkMethod> methodResolver, final Describer<FrameworkMethod> methodDescriber) {
//         super(contextResolver);
//         this.methodResolver = methodResolver;
//         this.methodDescriber = methodDescriber;
//     }
// 
//     @Override
//     protected void addChildren(final Description description, final TestClass testClass) {
//         for (final FrameworkMethod method : methodResolver.getChildren(testClass))
//             description.addChild(methodDescriber.describe(method));
// 
//         super.addChildren(description, testClass);
//     }
// }
// 
// Path: src/test/java/de/bechte/junit/stubs/ContextTestClassStub.java
// public class ContextTestClassStub {
//     public class A {
//         @Test
//         public void innerTestMethod() throws Exception {
//         }
//     }
// 
//     public class B {
//         public class C {
//             @Test
//             public void failingTestMethod() throws Exception {
//                 fail("Failing!");
//             }
//         }
//     }
// 
//     @Test
//     public void outerTestMethod() throws Exception {
//     }
// }
// 
// Path: src/test/java/de/bechte/junit/stubs/ContextTestClassWithInheritedAbstractInnerClassStub.java
// public class ContextTestClassWithInheritedAbstractInnerClassStub {
//     public abstract class A {
//         @Before
//         public void setup() throws Exception {
//         }
// 
//         @Test
//         public void runTestTwice() throws Exception {
//         }
//     }
// 
//     public class B extends A {
//         @Test
//         public void runTestOnce() throws Exception {
//         }
//     }
// 
//     public class C extends A {
//     }
// }
// 
// Path: src/test/java/de/bechte/junit/stubs/EmptyTestClassStub.java
// public class EmptyTestClassStub {
// }
// 
// Path: src/test/java/de/bechte/junit/stubs/SimpleTestClassStub.java
// public class SimpleTestClassStub {
//     @Test
//     public void testMethod() throws Exception {
//     }
// 
//     @Test
//     public void failingTestMethod() throws Exception {
//         fail("Failing!");
//     }
// }


// Path: src/test/java/de/bechte/junit/runners/context/processing/ContextExecutorTest.java
import de.bechte.junit.runners.context.description.ContextDescriber;
import de.bechte.junit.stubs.ContextTestClassStub;
import de.bechte.junit.stubs.ContextTestClassWithInheritedAbstractInnerClassStub;
import de.bechte.junit.stubs.EmptyTestClassStub;
import de.bechte.junit.stubs.SimpleTestClassStub;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.Description;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunNotifier;
import org.mockito.Mock;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import static org.mockito.MockitoAnnotations.initMocks;

package de.bechte.junit.runners.context.processing;



public class ContextExecutorTest {
    @Mock
    private ContextDescriber describer;

    @Mock
    private RunNotifier notifier;

    private ContextExecutor executor;

    @Before
    public void setUp() throws Exception {
        initMocks(this);

        executor = new ContextExecutor(describer);
    }

    @Test
    public void verifyNotificationsForExecutionOf_SimpleTestClass() throws Exception {
        executor.run(null, SimpleTestClassStub.class, notifier);

        verify(notifier, times(2)).fireTestStarted(any(Description.class));