forked from exercism/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameMasterProxy.java
More file actions
36 lines (30 loc) · 1.3 KB
/
Copy pathGameMasterProxy.java
File metadata and controls
36 lines (30 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* This is a helper class to be able to run the tests for this exercise.
* The tests are located in the {@link GameMasterTest} class.
*
* @see GameMasterTest
*/
public class GameMasterProxy extends ReflectionProxy {
@Override
public String getTargetClassName() {
return "GameMaster";
}
public String describe(Character character) {
return invokeMethod("describe", String.class, new Class[] { Character.class }, character);
}
public String describe(Destination character) {
return invokeMethod("describe", String.class, new Class[] { Destination.class }, character);
}
public String describe(TravelMethod character) {
return invokeMethod("describe", String.class, new Class[] { TravelMethod.class }, character);
}
public String describe(Character character, Destination destination, TravelMethod travelMethod) {
return invokeMethod("describe", String.class,
new Class[] { Character.class, Destination.class, TravelMethod.class },
character, destination, travelMethod);
}
public String describe(Character character, Destination destination) {
return invokeMethod("describe", String.class, new Class[] { Character.class, Destination.class },
character, destination);
}
}