// Path: src/robolectric2-test/test/com/nikhaldimann/viewselector/robolectric2/testutil/Robolectric2ViewFactory.java
// public class Robolectric2ViewFactory extends ProvidedContextViewFactory {
// 
//     public Robolectric2ViewFactory() {
//         super(Robolectric.application);
//     }
// 
// }
// 
// Path: src/test-lib/src/com/nikhaldimann/viewselector/test/abstrakt/checker/AbstractClassCheckerTest.java
// public abstract class AbstractClassCheckerTest extends ViewSelectorAndroidTestCase {
// 
//     private Iterable<View> check(String selectorTag, Combinator combinator, View view) {
//         Selector selector = new Selector(selectorTag, combinator);
//         ClassChecker checker = new ClassChecker(selector, view);
//         ViewSelection selection = new ViewSelection();
//         selection.add(view);
//         return checker.check(selection);
//     }
// 
//     @Test
//     public void testSingleView() {
//         TextView view = viewFactory.createTextView();
//         assertContentsInOrder(check("FooView", Combinator.DESCENDANT, view));
//         assertContentsInOrder(check("TextView", Combinator.DESCENDANT, view), view);
//         assertContentsInOrder(check("*", Combinator.DESCENDANT, view), view);
//     }
// 
//     @Test
//     public void testViewGroupWithDescendants() {
//         LinearLayout layout = viewFactory.createLinearLayout();
//         TextView view1 = viewFactory.createTextView();
//         TextView view2 = viewFactory.createTextView();
//         layout.addView(view1);
//         layout.addView(view2);
//         FrameLayout layout2 = viewFactory.createFrameLayout();
//         TextView view3 = viewFactory.createTextView();
//         layout2.addView(view3);
//         layout.addView(layout2);
//         assertContentsInOrder(check("*", Combinator.DESCENDANT, layout), layout, view1, view2, layout2, view3);
//         assertContentsInOrder(check("FooView", Combinator.DESCENDANT, layout));
//         assertContentsInOrder(check("LinearLayout", Combinator.DESCENDANT, layout), layout);
//         assertContentsInOrder(check("FrameLayout", Combinator.DESCENDANT, layout), layout2);
//         assertContentsInOrder(check("TextView", Combinator.DESCENDANT, layout), view1, view2, view3);
//     }
// 
//     @Test
//     public void testViewGroupWithChildren() {
//         LinearLayout layout = viewFactory.createLinearLayout();
//         TextView view1 = viewFactory.createTextView();
//         TextView view2 = viewFactory.createTextView();
//         layout.addView(view1);
//         layout.addView(view2);
//         FrameLayout layout2 = viewFactory.createFrameLayout();
//         TextView view3 = viewFactory.createTextView();
//         layout2.addView(view3);
//         layout.addView(layout2);
//         assertContentsInOrder(check("FooView", Combinator.CHILD, layout));
//         assertContentsInOrder(check("LinearLayout", Combinator.CHILD, layout));
//         assertContentsInOrder(check("TextView", Combinator.CHILD, layout), view1, view2);
//         assertContentsInOrder(check("FrameLayout", Combinator.CHILD, layout2));
//     }
// 
//     @Test
//     public void testAdjacentSiblings() {
//         LinearLayout layout = viewFactory.createLinearLayout();
//         TextView view1 = viewFactory.createTextView();
//         TextView view2 = viewFactory.createTextView();
//         TextView view3 = viewFactory.createTextView();
//         layout.addView(view1);
//         layout.addView(view2);
//         layout.addView(view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.ADJACENT_SIBLING, layout));
//         assertContentsInOrder(
//                 check("TextView", Combinator.ADJACENT_SIBLING, view1), view2);
//         assertContentsInOrder(
//                 check("TextView", Combinator.ADJACENT_SIBLING, view2), view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.ADJACENT_SIBLING, view3));
//     }
// 
//     @Test
//     public void testGeneralSiblings() {
//         LinearLayout layout = viewFactory.createLinearLayout();
//         TextView view1 = viewFactory.createTextView();
//         TextView view2 = viewFactory.createTextView();
//         TextView view3 = viewFactory.createTextView();
//         layout.addView(view1);
//         layout.addView(view2);
//         layout.addView(view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.GENERAL_SIBLING, layout));
//         assertContentsInOrder(
//                 check("TextView", Combinator.GENERAL_SIBLING, view1), view2, view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.GENERAL_SIBLING, view2), view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.GENERAL_SIBLING, view3));
//     }
// 
// }
// 
// Path: src/test-lib/src/com/nikhaldimann/viewselector/test/util/ViewFactory.java
// public interface ViewFactory {
// 
//     TextView createTextView();
// 
//     LinearLayout createLinearLayout();
// 
//     FrameLayout createFrameLayout();
// 
// }


import org.junit.runner.RunWith;
import com.nikhaldimann.viewselector.robolectric2.testutil.Robolectric2ViewFactory;
import com.nikhaldimann.viewselector.test.abstrakt.checker.AbstractClassCheckerTest;
import com.nikhaldimann.viewselector.test.util.ViewFactory;
import org.robolectric.RobolectricTestRunner;
package com.nikhaldimann.viewselector.robolectric2.checker;



@RunWith(RobolectricTestRunner.class)
public class ClassCheckerTest extends AbstractClassCheckerTest {

// Path: src/robolectric2-test/test/com/nikhaldimann/viewselector/robolectric2/testutil/Robolectric2ViewFactory.java
// public class Robolectric2ViewFactory extends ProvidedContextViewFactory {
// 
//     public Robolectric2ViewFactory() {
//         super(Robolectric.application);
//     }
// 
// }
// 
// Path: src/test-lib/src/com/nikhaldimann/viewselector/test/abstrakt/checker/AbstractClassCheckerTest.java
// public abstract class AbstractClassCheckerTest extends ViewSelectorAndroidTestCase {
// 
//     private Iterable<View> check(String selectorTag, Combinator combinator, View view) {
//         Selector selector = new Selector(selectorTag, combinator);
//         ClassChecker checker = new ClassChecker(selector, view);
//         ViewSelection selection = new ViewSelection();
//         selection.add(view);
//         return checker.check(selection);
//     }
// 
//     @Test
//     public void testSingleView() {
//         TextView view = viewFactory.createTextView();
//         assertContentsInOrder(check("FooView", Combinator.DESCENDANT, view));
//         assertContentsInOrder(check("TextView", Combinator.DESCENDANT, view), view);
//         assertContentsInOrder(check("*", Combinator.DESCENDANT, view), view);
//     }
// 
//     @Test
//     public void testViewGroupWithDescendants() {
//         LinearLayout layout = viewFactory.createLinearLayout();
//         TextView view1 = viewFactory.createTextView();
//         TextView view2 = viewFactory.createTextView();
//         layout.addView(view1);
//         layout.addView(view2);
//         FrameLayout layout2 = viewFactory.createFrameLayout();
//         TextView view3 = viewFactory.createTextView();
//         layout2.addView(view3);
//         layout.addView(layout2);
//         assertContentsInOrder(check("*", Combinator.DESCENDANT, layout), layout, view1, view2, layout2, view3);
//         assertContentsInOrder(check("FooView", Combinator.DESCENDANT, layout));
//         assertContentsInOrder(check("LinearLayout", Combinator.DESCENDANT, layout), layout);
//         assertContentsInOrder(check("FrameLayout", Combinator.DESCENDANT, layout), layout2);
//         assertContentsInOrder(check("TextView", Combinator.DESCENDANT, layout), view1, view2, view3);
//     }
// 
//     @Test
//     public void testViewGroupWithChildren() {
//         LinearLayout layout = viewFactory.createLinearLayout();
//         TextView view1 = viewFactory.createTextView();
//         TextView view2 = viewFactory.createTextView();
//         layout.addView(view1);
//         layout.addView(view2);
//         FrameLayout layout2 = viewFactory.createFrameLayout();
//         TextView view3 = viewFactory.createTextView();
//         layout2.addView(view3);
//         layout.addView(layout2);
//         assertContentsInOrder(check("FooView", Combinator.CHILD, layout));
//         assertContentsInOrder(check("LinearLayout", Combinator.CHILD, layout));
//         assertContentsInOrder(check("TextView", Combinator.CHILD, layout), view1, view2);
//         assertContentsInOrder(check("FrameLayout", Combinator.CHILD, layout2));
//     }
// 
//     @Test
//     public void testAdjacentSiblings() {
//         LinearLayout layout = viewFactory.createLinearLayout();
//         TextView view1 = viewFactory.createTextView();
//         TextView view2 = viewFactory.createTextView();
//         TextView view3 = viewFactory.createTextView();
//         layout.addView(view1);
//         layout.addView(view2);
//         layout.addView(view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.ADJACENT_SIBLING, layout));
//         assertContentsInOrder(
//                 check("TextView", Combinator.ADJACENT_SIBLING, view1), view2);
//         assertContentsInOrder(
//                 check("TextView", Combinator.ADJACENT_SIBLING, view2), view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.ADJACENT_SIBLING, view3));
//     }
// 
//     @Test
//     public void testGeneralSiblings() {
//         LinearLayout layout = viewFactory.createLinearLayout();
//         TextView view1 = viewFactory.createTextView();
//         TextView view2 = viewFactory.createTextView();
//         TextView view3 = viewFactory.createTextView();
//         layout.addView(view1);
//         layout.addView(view2);
//         layout.addView(view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.GENERAL_SIBLING, layout));
//         assertContentsInOrder(
//                 check("TextView", Combinator.GENERAL_SIBLING, view1), view2, view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.GENERAL_SIBLING, view2), view3);
//         assertContentsInOrder(
//                 check("TextView", Combinator.GENERAL_SIBLING, view3));
//     }
// 
// }
// 
// Path: src/test-lib/src/com/nikhaldimann/viewselector/test/util/ViewFactory.java
// public interface ViewFactory {
// 
//     TextView createTextView();
// 
//     LinearLayout createLinearLayout();
// 
//     FrameLayout createFrameLayout();
// 
// }


// Path: src/robolectric2-test/test/com/nikhaldimann/viewselector/robolectric2/checker/ClassCheckerTest.java
import org.junit.runner.RunWith;
import com.nikhaldimann.viewselector.robolectric2.testutil.Robolectric2ViewFactory;
import com.nikhaldimann.viewselector.test.abstrakt.checker.AbstractClassCheckerTest;
import com.nikhaldimann.viewselector.test.util.ViewFactory;
import org.robolectric.RobolectricTestRunner;

package com.nikhaldimann.viewselector.robolectric2.checker;



@RunWith(RobolectricTestRunner.class)
public class ClassCheckerTest extends AbstractClassCheckerTest {

    protected ViewFactory createViewFactory() {