//test file for class Services 

#include "Services.h"

int main()
{
    Services aServices = Services("testSample.csv");
    vector <Service> result = aServices.getServices();

    vector <Service> expectedResult;
    list <string> s1={"server1","server1bis"};
    list <string> s3={"server3"};
    list <string> s4;
    list <string> s5;
    list <string> s6;
    list <string> s7;

    expectedResult.push_back(Service(1,"username1",s1));
    expectedResult.push_back(Service(3,"username3",s3));
    expectedResult.push_back(Service(4,"username4",s4));
    expectedResult.push_back(Service(5,"username5",s5));
    expectedResult.push_back(Service(6,"",s6));
    expectedResult.push_back(Service(7,"username7",s7));

    if(expectedResult==result){
        cout << "Services test: OK" << endl;
        return 0;
    }else {
        cout << "Services test: FAIL" << endl;
        return 1;
    }
}


