@@ -40,13 +40,15 @@ public class DownloadFilesTestSteps extends FunctionalTestBase {
40
40
private int applicationPort ;
41
41
private String hostName = getHostName ();
42
42
43
-
43
+
44
44
@ Given ("^Eiffel Intelligence instance is up and running$" )
45
45
public void eiffel_intelligence_instance_is_up_and_running () throws Exception {
46
46
LOGGER .debug ("Checking if Eiffel Intelligence instance is up and running." );
47
- httpRequest .setHost (hostName ).setPort (applicationPort ).
48
- setHeaders ("Content-type:" , MediaType .APPLICATION_JSON_VALUE .toString ()).
49
- setEndpoint ("/subscriptions" );
47
+ httpRequest .setHost (hostName )
48
+ .setPort (applicationPort )
49
+ .setHeaders ("Content-type:" , MediaType .APPLICATION_JSON_VALUE .toString ())
50
+ .setEndpoint ("/subscriptions" );
51
+
50
52
response = httpRequest .performRequest ();
51
53
assertEquals (response .getStatusCode (), HttpStatus .OK );
52
54
}
@@ -56,8 +58,7 @@ public void list_available_files() throws Exception {
56
58
LOGGER .debug ("Listing all availble files that can be download via RestApi." );
57
59
String expectedSubscriptionsValue = "/download/subscriptionsTemplate" ;
58
60
59
- httpRequest .setHeaders ("Content-type:" , MediaType .APPLICATION_JSON_VALUE .toString ()).
60
- setEndpoint ("/download" );
61
+ httpRequest .setEndpoint ("/download" );
61
62
response = httpRequest .performRequest ();
62
63
63
64
assertEquals (HttpStatus .OK , response .getStatusCode ());
@@ -72,8 +73,7 @@ public void list_available_files() throws Exception {
72
73
public void get_subscription_template_file () throws Exception {
73
74
String expectedSubscriptionTemplateContent = FileUtils .readFileToString (new File (SUBSCRIPTIONS_TEMPLATE_FILEPATH ), "UTF-8" );
74
75
75
- httpRequest .setHeaders ("Content-type:" , MediaType .APPLICATION_JSON_VALUE .toString ()).
76
- setEndpoint ("/download/subscriptionsTemplate" );
76
+ httpRequest .setEndpoint ("/download/subscriptionsTemplate" );
77
77
response = httpRequest .performRequest ();
78
78
79
79
assertEquals (HttpStatus .OK , response .getStatusCode ());
@@ -88,8 +88,7 @@ public void get_subscription_template_file() throws Exception {
88
88
public void get_rules_template_file () throws Exception {
89
89
String expectedRulesTemplateContent = FileUtils .readFileToString (new File (RULES_TEMPLATE_FILEPATH ), "UTF-8" );
90
90
91
- httpRequest .setHeaders ("Content-type:" , MediaType .APPLICATION_JSON_VALUE .toString ()).
92
- setEndpoint ("/download/rulesTemplate" );
91
+ httpRequest .setEndpoint ("/download/rulesTemplate" );
93
92
response = httpRequest .performRequest ();
94
93
95
94
assertEquals (HttpStatus .OK , response .getStatusCode ());
@@ -104,8 +103,7 @@ public void get_rules_template_file() throws Exception {
104
103
public void get_event_template_file () throws Exception {
105
104
String expectedEventsTemplateContent = FileUtils .readFileToString (new File (EVENTS_TEMPLATE_FILEPATH ), "UTF-8" );
106
105
107
- httpRequest .setHeaders ("Content-type:" , MediaType .APPLICATION_JSON_VALUE .toString ()).
108
- setEndpoint ("/download/eventsTemplate" );
106
+ httpRequest .setEndpoint ("/download/eventsTemplate" );
109
107
response = httpRequest .performRequest ();
110
108
111
109
assertEquals (HttpStatus .OK , response .getStatusCode ());
0 commit comments