Home | History | Annotate | Download | only in testing
      1 package org.robolectric.testing;
      2 
      3 import org.robolectric.annotation.Implementation;
      4 import org.robolectric.annotation.Implements;
      5 import org.robolectric.annotation.internal.Instrument;
      6 
      7 @Instrument
      8 public class Pony {
      9   public Pony() {
     10   }
     11 
     12   public String ride(String where) {
     13     return "Whinny! You're on my " + where + "!";
     14   }
     15 
     16   public static String prance(String where) {
     17     return "I'm prancing to " + where + "!";
     18   }
     19 
     20   public String saunter(String where) {
     21     return "Off I saunter to " + where + "!";
     22   }
     23 
     24   @Implements(Pony.class)
     25   public static class ShadowPony {
     26     @Implementation
     27     public String ride(String where) {
     28       return "Fake whinny! You're on my " + where + "!";
     29     }
     30 
     31     @Implementation
     32     protected static String prance(String where) {
     33       return "I'm shadily prancing to " + where + "!";
     34     }
     35   }
     36 }
     37