// Path: src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java
// public static ViewSelectionAssert assertThat(ViewSelection actual) {
//     return new ViewSelectionAssert(actual);
// }
// 
// Path: src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java
// public static ViewSelectionAssert assertThatSelection(String selector, Activity activity) {
//     return assertThat(selection(selector, activity));
// }
// 
// Path: src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java
// public static Attributes extractAttribute(String attributeName) {
//     return new Attributes(attributeName);
// }
// 
// Path: src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java
// public static ViewSelection selection(String selector, Activity activity) {
//     return selection(selector, activity.findViewById(android.R.id.content));
// }
// 
// Path: src/test-lib/src/com/nikhaldimann/viewselector/test/util/ViewSelectorAndroidTestCase.java
// public abstract class ViewSelectorAndroidTestCase extends AndroidTestCase {
// 
//     protected ViewFactory viewFactory;
// 
//     @Before
//     public void setUp() throws Exception {
//         super.setUp();
//         viewFactory = createViewFactory();
//     }
// 
//     /**
//      * @return the factory to be used for creating views in this test
//      */
//     protected abstract ViewFactory createViewFactory();
// 
//     /**
//      * Reimplementation of Android's MoreAsserts.assertContentsInOrder() because we
//      * can't use MoreAsserts in Robolectric 1.2.
//      */
//     public static void assertContentsInOrder(Iterable<?> actual, Object... expected) {
//         ArrayList<Object> actualList = new ArrayList<Object>();
//         for (Object o : actual) {
//             actualList.add(o);
//         }
//         assertEquals(Arrays.asList(expected), actualList);
//     }
// }


import static com.nikhaldimann.viewselector.ViewSelectorAssertions.assertThat;
import static com.nikhaldimann.viewselector.ViewSelectorAssertions.assertThatSelection;
import static com.nikhaldimann.viewselector.ViewSelectorAssertions.extractAttribute;
import static com.nikhaldimann.viewselector.ViewSelectorAssertions.selection;
import org.junit.Test;
import android.widget.TextView;
import com.nikhaldimann.viewselector.test.util.ViewSelectorAndroidTestCase;
package com.nikhaldimann.viewselector.test.abstrakt;





public abstract class AbstractViewSelectorAssertionsTest extends ViewSelectorAndroidTestCase {

    /**
     * Fails with a RuntimeException, so we can distinguish this from planned
     * assertion failures.
     */
    private void failHard() {
        throw new RuntimeException("Failed to cause an assertion failure");
    }

    @Test
    public void testAssertThat() {
        TextView view = viewFactory.createTextView();
        assertThat(selection("TextView", view))
            .hasSize(1)
            .startsWith(view)
            .endsWith(view);
    }

    @Test
    public void testFailingAssertThat() {
// Path: src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java
// public static ViewSelectionAssert assertThat(ViewSelection actual) {
//     return new ViewSelectionAssert(actual);
// }
// 
// Path: src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java
// public static ViewSelectionAssert assertThatSelection(String selector, Activity activity) {
//     return assertThat(selection(selector, activity));
// }
// 
// Path: src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java
// public static Attributes extractAttribute(String attributeName) {
//     return new Attributes(attributeName);
// }
// 
// Path: src/main/java/com/nikhaldimann/viewselector/ViewSelectorAssertions.java
// public static ViewSelection selection(String selector, Activity activity) {
//     return selection(selector, activity.findViewById(android.R.id.content));
// }
// 
// Path: src/test-lib/src/com/nikhaldimann/viewselector/test/util/ViewSelectorAndroidTestCase.java
// public abstract class ViewSelectorAndroidTestCase extends AndroidTestCase {
// 
//     protected ViewFactory viewFactory;
// 
//     @Before
//     public void setUp() throws Exception {
//         super.setUp();
//         viewFactory = createViewFactory();
//     }
// 
//     /**
//      * @return the factory to be used for creating views in this test
//      */
//     protected abstract ViewFactory createViewFactory();
// 
//     /**
//      * Reimplementation of Android's MoreAsserts.assertContentsInOrder() because we
//      * can't use MoreAsserts in Robolectric 1.2.
//      */
//     public static void assertContentsInOrder(Iterable<?> actual, Object... expected) {
//         ArrayList<Object> actualList = new ArrayList<Object>();
//         for (Object o : actual) {
//             actualList.add(o);
//         }
//         assertEquals(Arrays.asList(expected), actualList);
//     }
// }


// Path: src/test-lib/src/com/nikhaldimann/viewselector/test/abstrakt/AbstractViewSelectorAssertionsTest.java
import static com.nikhaldimann.viewselector.ViewSelectorAssertions.assertThat;
import static com.nikhaldimann.viewselector.ViewSelectorAssertions.assertThatSelection;
import static com.nikhaldimann.viewselector.ViewSelectorAssertions.extractAttribute;
import static com.nikhaldimann.viewselector.ViewSelectorAssertions.selection;
import org.junit.Test;
import android.widget.TextView;
import com.nikhaldimann.viewselector.test.util.ViewSelectorAndroidTestCase;

package com.nikhaldimann.viewselector.test.abstrakt;





public abstract class AbstractViewSelectorAssertionsTest extends ViewSelectorAndroidTestCase {

    /**
     * Fails with a RuntimeException, so we can distinguish this from planned
     * assertion failures.
     */
    private void failHard() {
        throw new RuntimeException("Failed to cause an assertion failure");
    }

    @Test
    public void testAssertThat() {
        TextView view = viewFactory.createTextView();
        assertThat(selection("TextView", view))
            .hasSize(1)
            .startsWith(view)
            .endsWith(view);
    }

    @Test
    public void testFailingAssertThat() {
        try {