Exemplo n.º 1
0
 @Test
 public void testSetClassName() throws Exception {
   Intent intent = new Intent();
   Class<? extends IntentTest> thisClass = getClass();
   intent.setClassName("package.name", thisClass.getName());
   assertSame(thisClass.getName(), intent.getComponent().getClassName());
   assertEquals("package.name", intent.getComponent().getPackageName());
   ShadowIntent si = shadowOf(intent);
   assertSame(si.getIntentClass(), thisClass);
 }
Exemplo n.º 2
0
  @Test
  public void testSetClass() throws Exception {
    Intent intent = new Intent();
    Class<? extends IntentTest> thisClass = getClass();
    Intent output = intent.setClass(new Activity(), thisClass);

    assertSame(output, intent);
    ShadowIntent si = shadowOf(intent);
    assertSame(si.getIntentClass(), thisClass);
  }