當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。