import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import {BaseService} from '../../../share/base.service';

@Injectable()
export class TestListService extends BaseService {

  constructor(protected http: Http) {
    super(http);
  }

  getTestList() {
    return this.requestGet('atlas/test?orderby=testName&ordertype=ASC');
  }

  deleteTest(id) {
    return this.requestDelete('test/' + id);
  }

  cloneTest(id) {
    let obj: any = {};
    obj.testId = id;
    return this.requestPost('cloneTest', obj);
  }
}
