@@ -21,24 +21,30 @@ public com.ost.services.v1.Transactions getService() {
2121 return (com .ost .services .v1 .Transactions ) super .getService ();
2222 }
2323
24- @ Override
25- public com .ost .services .v1 .Manifest getServiceManifest () {
26- return (com .ost .services .v1 .Manifest ) super .getServiceManifest ();
27- }
28-
2924 @ Override
3025 protected void setUpApiEndPoint () throws Exception {
3126 String apiEndPoint = ApiEndPointProvider .getV1EndPoint ();
3227 setApiEndPoint ( apiEndPoint );
3328 }
3429
3530
36- HashMap <String ,Object > commonParams ;
31+ protected HashMap <String ,Object > commonParams ;
32+ protected com .ost .services .v1 .Actions actionsService ;
3733 @ Before
3834 public void setUp () throws Exception {
3935 super .setUp ();
40- setService ( getServiceManifest ().transactions );
36+ setService ();
37+ postSetup ();
38+ }
39+
40+ protected void setService () {
41+ com .ost .services .v1 .Manifest services = (com .ost .services .v1 .Manifest ) getServiceManifest ();
42+ setService ( services .transactions );
43+ actionsService = services .actions ;
44+ }
45+
4146
47+ protected void postSetup () throws Exception {
4248
4349 //First Create an action
4450 HashMap <String ,Object > params = new HashMap <String , Object >();
@@ -53,7 +59,7 @@ public void setUp() throws Exception {
5359 JsonObject response ;
5460 String resultType = "action" ;
5561 Boolean isArrayResultType = false ;
56- response = getServiceManifest (). actions .create ( params );
62+ response = actionsService .create ( params );
5763 validateResponseWithSuccess ( response , resultType , isArrayResultType );
5864 JsonObject actionResult = response .getAsJsonObject ("data" ).getAsJsonObject ( resultType );
5965
@@ -69,9 +75,8 @@ public void setUp() throws Exception {
6975 commonParams .put ("from_user_id" , fromUserId );
7076 commonParams .put ("to_user_id" , toUserId );
7177 commonParams .put ("action_id" , actionResult .get ("id" ).getAsString () );
72-
73-
7478 }
79+
7580 @ Test
7681 public void execute () throws IOException {
7782 HashMap <String ,Object > params = new HashMap <String , Object >();
0 commit comments