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


Java ShadowToast.getTextOfLatestToast方法代码示例

本文整理汇总了Java中org.robolectric.shadows.ShadowToast.getTextOfLatestToast方法的典型用法代码示例。如果您正苦于以下问题:Java ShadowToast.getTextOfLatestToast方法的具体用法?Java ShadowToast.getTextOfLatestToast怎么用?Java ShadowToast.getTextOfLatestToast使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.robolectric.shadows.ShadowToast的用法示例。


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

示例1: startWithProperty

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
private ActivityController startWithProperty(Property property)
{
    long id = db.insertProperty(property);

    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putLong("id", id);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertyProjectionsActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing() == false);

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNull(latestToast);

    return controller;
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:23,代码来源:PropertyProjectionsActivityTest.java

示例2: startWithProperty

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
private ActivityController startWithProperty(Property property)
{
    long id = db.insertProperty(property);

    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putLong("id", id);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertyViewActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing() == false);

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNull(latestToast);

    return controller;
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:23,代码来源:PropertyViewActivityTest.java

示例3: startWithFile

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
private ActivityController startWithFile(File file) throws IOException
{
    Intent intent = new Intent();

    final Bundle bundle = new Bundle();
    bundle.putString("file", file.getAbsolutePath());
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PictureViewActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing() == false);

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNull(latestToast);

    return controller;
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:22,代码来源:PictureViewActivityTest.java

示例4: startWithMap

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
private ActivityController startWithMap(Map<String, Integer> map)
{
    Intent intent = new Intent();

    final Bundle bundle = new Bundle();
    bundle.putInt("title", R.string.app_name);
    bundle.putInt("description", R.string.app_name);
    bundle.putSerializable("items", new HashMap<>(map));
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(ItemizeActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing() == false);

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNull(latestToast);

    return controller;
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:24,代码来源:ItemizationActivityTest.java

示例5: startWithMissingProperty

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
@Test
public void startWithMissingProperty()
{
    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putLong("id", 0);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertyOverviewActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing());

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNotNull(latestToast);
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:20,代码来源:PropertyOverviewActivityTest.java

示例6: startWithProperty

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
private ActivityController startWithProperty(Property property)
{
    long id = db.insertProperty(property);

    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putLong("id", id);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertyOverviewActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing() == false);

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNull(latestToast);

    return controller;
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:23,代码来源:PropertyOverviewActivityTest.java

示例7: startWithoutProperty

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
@Test
public void startWithoutProperty()
{
    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertySummaryActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing());

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNotNull(latestToast);
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:19,代码来源:PropertySummaryActivityTest.java

示例8: startWithMissingProperty

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
@Test
public void startWithMissingProperty()
{
    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putLong("id", 0);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertySummaryActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing());

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNotNull(latestToast);
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:20,代码来源:PropertySummaryActivityTest.java

示例9: startWithoutMap

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
@Test
public void startWithoutMap()
{
    Intent intent = new Intent();

    final Bundle bundle = new Bundle();
    bundle.putInt("title", R.string.app_name);
    bundle.putInt("description", R.string.app_name);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(ItemizeActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    assertTrue(activity.isFinishing());

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNotNull(latestToast);
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:20,代码来源:ItemizationActivityTest.java

示例10: startWithNotes

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
private ActivityController startWithNotes(String notes)
{
    Property property = new Property();
    property.notes = notes;

    long id = db.insertProperty(property);

    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putLong("id", id);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertyNotesActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    assertTrue(activity.isFinishing() == false);

    controller.start();
    controller.visible();
    controller.resume();

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNull(latestToast);

    return controller;
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:27,代码来源:PropertyNotesActivityTest.java

示例11: startWithoutDescription

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
@Test
public void startWithoutDescription()
{
    Intent intent = new Intent();

    final Bundle bundle = new Bundle();
    bundle.putInt("title", R.string.app_name);
    bundle.putSerializable("items", new HashMap<String, Integer>());
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(ItemizeActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    assertTrue(activity.isFinishing());

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNotNull(latestToast);
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:20,代码来源:ItemizationActivityTest.java

示例12: startWithMissingProperty

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
@Test
public void startWithMissingProperty()
{
    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putLong("id", 0);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertyPicturesActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    assertTrue(activity.isFinishing());

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNotNull(latestToast);
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:18,代码来源:PropertyPicturesActivityTest.java

示例13: startWithoutRequest

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
@Test
public void startWithoutRequest()
{
    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(DictionaryActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing());

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNotNull(latestToast);
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:19,代码来源:DictionaryActivityTest.java

示例14: startWithRequest

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
private ActivityController startWithRequest(DictionaryItem item)
{
    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putInt("title", item.titleId);
    bundle.putInt("definition", item.definitionId);
    if(item.formulaId != null)
    {
        bundle.putInt("formula", item.formulaId);
    }
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(DictionaryActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    controller.visible();
    controller.resume();
    assertTrue(activity.isFinishing() == false);

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNull(latestToast);

    return controller;
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:26,代码来源:DictionaryActivityTest.java

示例15: startWithMissingProperty

import org.robolectric.shadows.ShadowToast; //导入方法依赖的package包/类
@Test
public void startWithMissingProperty()
{
    Intent intent = new Intent();
    final Bundle bundle = new Bundle();
    bundle.putLong("id", 0);
    intent.putExtras(bundle);

    ActivityController controller = Robolectric.buildActivity(PropertyWorksheetActivity.class, intent).create();
    Activity activity = (Activity)controller.get();

    controller.start();
    assertTrue(activity.isFinishing());

    String latestToast = ShadowToast.getTextOfLatestToast();
    assertNotNull(latestToast);
}
 
开发者ID:brarcher,项目名称:rental-calc,代码行数:18,代码来源:PropertyWorksheetActivityTest.java


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