Skip to content

Commit 1d2d861

Browse files
committed
Tests Cases Review
Setting the necessary private methods in api.service.ts Rewriting Test cases of public methods
1 parent b97da3e commit 1d2d861

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

client/src/app/api/api/api.service.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export class ApiService {
191191
);
192192
}
193193

194-
public post(endpoint: string, componentType: string, name: string, observe: any = 'body', reportProgress: boolean = false): any {
194+
private post(endpoint: string, componentType: string, name: string, observe: any = 'body', reportProgress: boolean = false): any {
195195
if (componentType === null || componentType === undefined && name === null || name === undefined) {
196196
throw new Error('Required parameter componentType and Instance Name was null or undefined when calling getInstanceNumber.');
197197
}
@@ -225,7 +225,7 @@ export class ApiService {
225225
}
226226

227227

228-
public postAction(endpoint: string, idInstance: string, observe: any = 'body', reportProgress: boolean = false):
228+
private postAction(endpoint: string, idInstance: string, observe: any = 'body', reportProgress: boolean = false):
229229
Observable<HttpEvent<number>> {
230230
let queryParam = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
231231

@@ -239,8 +239,7 @@ export class ApiService {
239239
}
240240

241241

242-
// This method is a common configuration to set the headers and query params
243-
public commonConf(endpoint: string, queryParameters: HttpParams, observe: any = 'body', reportProgress: boolean = false):
242+
private commonConf(endpoint: string, queryParameters: HttpParams, observe: any = 'body', reportProgress: boolean = false):
244243
Observable<HttpEvent<number>> {
245244
let headers = this.defaultHeaders;
246245

0 commit comments

Comments
 (0)