当前位置: 首页>>代码示例>>Java>>正文


Java R类代码示例

本文整理汇总了Java中course.labs.locationlab.R的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


R类属于course.labs.locationlab包,在下文中一共展示了R类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testRun

import course.labs.locationlab.R; //导入依赖的package包/类
public void testRun() {

		int delay = 2000;
		int longDelay = 5000;

		// Wait for activity: 'course.labs.locationlab.PlaceViewActivity'
		solo.waitForActivity(course.labs.locationlab.PlaceViewActivity.class,
				2000);

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_one);

		solo.sleep(delay);

		// Click on Get New Place
		assertTrue("Footer view isn't visible",
				solo.waitForView(course.labs.locationlab.R.id.footer, 0, delay));
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));

		// Assert that PlaceBadge is shown
		assertTrue("PlaceBadge is not shown!", solo.waitForText(
				solo.getString(R.string.the_greenhouse_string), 1, longDelay));

	}
 
开发者ID:aporter,项目名称:coursera-android-labs,代码行数:25,代码来源:TestOneValidLocation.java

示例2: testRun

import course.labs.locationlab.R; //导入依赖的package包/类
public void testRun() {

		int delay = 2000;
		int longDelay = 5000;

		// Wait for activity: 'course.labs.locationlab.PlaceViewActivity'
		solo.waitForActivity(course.labs.locationlab.PlaceViewActivity.class,
				2000);

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_one);

		solo.sleep(delay);

		// Click on Get New Place		
		assertTrue("Footer view isn't visible",
				solo.waitForView(course.labs.locationlab.R.id.footer, 0, delay));
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));

		solo.sleep(delay);

		// Assert that PlaceBadge is shown
		assertTrue("PlaceBadge is not shown!", solo.waitForText(
				solo.getString(R.string.the_greenhouse_string), 1, longDelay));

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_two);

		solo.sleep(delay);

		// Click on Get New Place
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));

		solo.sleep(delay);

		// Assert that PlaceBadge is shown
		assertTrue("PlaceBadge is not shown!", solo.waitForText(
				solo.getString(R.string.berwyn_string), 1, longDelay));

	}
 
开发者ID:aporter,项目名称:coursera-android-labs,代码行数:41,代码来源:TestTwoValidLocations.java

示例3: testRun

import course.labs.locationlab.R; //导入依赖的package包/类
public void testRun() {

		int delay = 2000;
		int longDelay = 5000;

		// Wait for activity: 'course.labs.locationlab.PlaceViewActivity'
		solo.waitForActivity(course.labs.locationlab.PlaceViewActivity.class, delay);

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_one);

		solo.sleep(delay);
		
		// Click on Get New Place
		assertTrue("Footer view isn't visible",
				solo.waitForView(course.labs.locationlab.R.id.footer, 0, delay));
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));
		
		solo.sleep(2000);

		// Assert that PlaceBadge is shown
		assertTrue("PlaceBadge is not shown!", solo.waitForText(
				solo.getString(R.string.the_greenhouse_string), 1, longDelay));

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_one);
		
		solo.sleep(delay);

		// Click on Get New Place
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));
		
		String samePlaceString = solo
				.getString(course.labs.locationlab.R.string.duplicate_location_string);

		// Assert that duplicate location Toast is shown
		assertTrue(samePlaceString + " is not shown!",
				solo.waitForText(samePlaceString, 1, longDelay));

	}
 
开发者ID:aporter,项目名称:coursera-android-labs,代码行数:41,代码来源:TestSameLocation.java

示例4: testRun

import course.labs.locationlab.R; //导入依赖的package包/类
public void testRun() {

		int delay = 2000;
		int longDelay = 5000;

		// Wait for activity: 'course.labs.locationlab.PlaceViewActivity'
		solo.waitForActivity(course.labs.locationlab.PlaceViewActivity.class,
				2000);

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_one);

		solo.sleep(delay);

		// Click on Get New Place
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));

		// Assert that PlaceBadge is shown
		assertTrue("PlaceBadge is not shown!", solo.waitForText(
				solo.getString(R.string.the_greenhouse_string), 1, longDelay));
				
		// Click on PlaceBadge
		solo.clickOnText(solo.getString(R.string.the_greenhouse_string));
		
		solo.sleep(delay);

		assertTrue("Detail view not shown!", solo.waitForText("Date"));
	}
 
开发者ID:aporter,项目名称:umd-android-labs,代码行数:29,代码来源:TestOneValidLocation.java

示例5: testRun

import course.labs.locationlab.R; //导入依赖的package包/类
public void testRun() {

		int delay = 2000;
		int longDelay = 5000;

		// Wait for activity: 'course.labs.locationlab.PlaceViewActivity'
		solo.waitForActivity(course.labs.locationlab.PlaceViewActivity.class, delay);

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_one);

		solo.sleep(delay);
		
		// Click on Get New Place
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));
		
		solo.sleep(2000);

		// Assert that PlaceBadge is shown
		assertTrue("PlaceBadge is not shown!", solo.waitForText(
				solo.getString(R.string.the_greenhouse_string), 1, longDelay));

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_one);
		
		solo.sleep(delay);

		// Click on Get New Place
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));
		
		String samePlaceString = solo
				.getString(course.labs.locationlab.R.string.duplicate_location_string);

		// Assert that duplicate location Toast is shown
		assertTrue(samePlaceString + " is not shown!",
				solo.waitForText(samePlaceString, 1, longDelay));

	}
 
开发者ID:aporter,项目名称:umd-android-labs,代码行数:39,代码来源:TestSameLocation.java

示例6: testRun

import course.labs.locationlab.R; //导入依赖的package包/类
public void testRun() {

		int delay = 2000;
		int longDelay = 5000;

		// Wait for activity: 'course.labs.locationlab.PlaceViewActivity'
		solo.waitForActivity(course.labs.locationlab.PlaceViewActivity.class,
				2000);

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_one);

		solo.sleep(delay);

		// Click on Get New Place
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));

		solo.sleep(delay);

		// Assert that PlaceBadge is shown
		assertTrue("PlaceBadge is not shown!", solo.waitForText(
				solo.getString(R.string.the_greenhouse_string), 1, longDelay));

		// Click on action bar item
		solo.clickOnActionBarItem(course.labs.locationlab.R.id.place_two);

		solo.sleep(delay);

		// Click on Get New Place
		solo.clickOnView(solo.getView(course.labs.locationlab.R.id.footer));

		solo.sleep(delay);

		// Assert that PlaceBadge is shown
		assertTrue("PlaceBadge is not shown!", solo.waitForText(
				solo.getString(R.string.berwyn_string), 1, longDelay));
		
		// Click on PlaceBadge
		solo.clickOnText(solo.getString(R.string.berwyn_string));

		solo.sleep(delay);

		assertTrue("Detail view not shown!", solo.waitForText("Date"));

	}
 
开发者ID:aporter,项目名称:umd-android-labs,代码行数:46,代码来源:TestTwoValidLocations.java


注:本文中的course.labs.locationlab.R类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。