public void GetByLinkTest_PersonalContact_PersonalContactList() { // Arrange IRestQuery query = new RestQueryStub(); // Act IList <PersonalContact> list = query.GetByLink <PersonalContact>("https://tt02.altinn.basefarm.net/api/serviceowner/organizations/070238225/personalcontacts"); // Assert Assert.IsTrue(list.Count == 3, "Personal Contact stub failed"); }
public void GetTest_FilterByEmail_ListOfOrganizations() { // Arrange IRestQuery query = new RestQueryStub(); // Act IList <Organization> list = query.Get <Organization>(new KeyValuePair <string, string>("email", "på[email protected]")); // Assert Assert.IsTrue(list.Count == 4, "Organization stub failed"); }
public void GetTest_SpecificOrganization_Organization() { // Arrange IRestQuery query = new RestQueryStub(); // Act Organization org = query.Get <Organization>("070238225"); // Assert Assert.IsTrue(org != null && org.OrganizationNumber == "070238225", "GetOrganization Stub by Id fails"); }
public void GetTest_FilterBySubjectReportee_ListOfRoles() { // Arrange IRestQuery query = new RestQueryStub(); // Act IList <Role> list = query.Get <Role>(new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("Subject", "16024400143"), new KeyValuePair <string, string>("Reportee", "910028146") }); // Assert Assert.IsTrue(list.Count == 2, "Role stub failed"); }