码迷,mamicode.com
首页 > 其他好文 > 详细

say Hellow

时间:2017-03-17 13:31:08      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:boa   alt   .com   creat   oid   span   run   type   created   

/**
 2  * Created by GuYin on 2017/3/15.
 3  */
 4 @RunWith(AndroidJUnit4.class)
 5 @LargeTest
 6 public class MainTest {
 7     private static final String STRING_TO_BE_TYPED = "peter";
 8 
 9 @Rule
10 public ActivityTestRule<MainActivity> mainActivityRule = new ActivityTestRule<>(MainActivity.class);
11 
12     @Test
13     public void sayHello(){
14         onView(withId(R.id.name)).perform(typeText(STRING_TO_BE_TYPED), ViewActions.closeSoftKeyboard());
15         onView(withText("SAY HELLO")).perform(click());
16         String expectedText = "Hello,"+STRING_TO_BE_TYPED+"!";
17         onView(withId(R.id.text)).check(matches(withText(expectedText)));
18     }
19 }

技术分享

say Hellow

标签:boa   alt   .com   creat   oid   span   run   type   created   

原文地址:http://www.cnblogs.com/LT1997/p/6565525.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!