@@ -0,0 +1,2199 @@
+package com.lukekorth.deviceautomator;%0A%0Aimport android.support.test.uiautomator.UiObject;%0Aimport android.support.test.uiautomator.UiObjectNotFoundException;%0Aimport android.support.test.uiautomator.UiSelector;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.robolectric.RobolectricTestRunner;%0A%0Aimport java.util.concurrent.CountDownLatch;%0A%0Aimport static junit.framework.Assert.assertEquals;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.verify;%0A%0A@RunWith(RobolectricTestRunner.class)%0Apublic class AutomatorActionTest %7B%0A%0A    @Test%0A    public void click() throws UiObjectNotFoundException %7B%0A        UiObject object = mock(UiObject.class);%0A%0A        AutomatorAction.click().perform(null, object);%0A%0A        verify(object).click();%0A    %7D%0A%0A    @Test%0A    public void setText() throws UiObjectNotFoundException %7B%0A        UiObject object = mock(UiObject.class);%0A%0A        AutomatorAction.setText(%22test%22).perform(null, object);%0A%0A        verify(object).setText(%22test%22);%0A    %7D%0A%0A    @Test%0A    public void clearTextField() throws UiObjectNotFoundException %7B%0A        UiObject object = mock(UiObject.class);%0A%0A        AutomatorAction.clearTextField().perform(null, object);%0A%0A        verify(object).clearTextField();%0A    %7D%0A%0A    @Test%0A    public void swipeRight() throws UiObjectNotFoundException %7B%0A        UiObject object = mock(UiObject.class);%0A%0A        AutomatorAction.swipeRight(5).perform(null, object);%0A%0A        verify(object).swipeRight(5);%0A    %7D%0A%0A    @Test(timeout = 1000)%0A    public void perform() throws InterruptedException %7B%0A        final UiSelector expectedSelector = mock(UiSelector.class);%0A        final UiObject expectedObject = mock(UiObject.class);%0A        final CountDownLatch latch = new CountDownLatch(1);%0A        AutomatorAction action = new AutomatorAction() %7B%0A            @Override%0A            void wrappedPerform(UiSelector selector, UiObject object) throws UiObjectNotFoundException %7B%0A                assertEquals(expectedSelector, selector);%0A                assertEquals(expectedObject, object);%0A                latch.countDown();%0A            %7D%0A        %7D;%0A%0A        action.perform(expectedSelector, expectedObject);%0A%0A        latch.await();%0A    %7D%0A%7D%0A

Add AutomatorAction tests