xref: /aosp_15_r20/external/robolectric/sandbox/src/test/java/org/robolectric/testing/Pony.java (revision e6ba16074e6af37d123cb567d575f496bf0a58ee)
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 {
Pony()9   public Pony() {}
10 
ride(String where)11   public String ride(String where) {
12     return "Whinny! You're on my " + where + "!";
13   }
14 
prance(String where)15   public static String prance(String where) {
16     return "I'm prancing to " + where + "!";
17   }
18 
saunter(String where)19   public String saunter(String where) {
20     return "Off I saunter to " + where + "!";
21   }
22 
23   @Implements(Pony.class)
24   public static class ShadowPony {
25     @Implementation
ride(String where)26     public String ride(String where) {
27       return "Fake whinny! You're on my " + where + "!";
28     }
29 
30     @Implementation
prance(String where)31     protected static String prance(String where) {
32       return "I'm shadily prancing to " + where + "!";
33     }
34   }
35 }
36