Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Beloo
authored and
Beloo
committed
Dec 23, 2016
1 parent
9b271a8
commit b09191e
Showing
8 changed files
with
129 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
sample/src/androidTest/java/com/beloo/widget/chipslayoutmanager/util/Action.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.beloo.widget.chipslayoutmanager.util; | ||
|
||
import android.support.test.espresso.UiController; | ||
import android.support.test.espresso.ViewAction; | ||
import android.view.View; | ||
|
||
import org.hamcrest.Matcher; | ||
|
||
import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom; | ||
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; | ||
import static org.hamcrest.Matchers.allOf; | ||
|
||
public abstract class Action<T extends View> implements ViewAction { | ||
@Override | ||
public Matcher<View> getConstraints() { | ||
return allOf(isAssignableFrom(View.class), isDisplayed()); | ||
} | ||
|
||
@Override | ||
public String getDescription() { | ||
return "action " + this.getClass().getSimpleName(); | ||
} | ||
|
||
@Override | ||
public final void perform(UiController uiController, View view) { | ||
performAction(uiController, (T) view); | ||
} | ||
|
||
public void performAction(UiController uiController, T view) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters