public void StudySubjectsRequest_correctly_requests_with_include_parameter_when_provided() { StudySubjectsRequest request; request = new StudySubjectsRequest(ProjectName, _Envrionment, include: "inactive"); Assert.IsTrue(request.UrlPath().Contains("include=inactive")); request = new StudySubjectsRequest(ProjectName, _Envrionment, include: "inactiveAndDeleted"); Assert.IsTrue(request.UrlPath().Contains("include=inactiveAndDeleted")); request = new StudySubjectsRequest(ProjectName, _Envrionment, include: "deleted"); Assert.IsTrue(request.UrlPath().Contains("include=deleted")); try { request = new StudySubjectsRequest(ProjectName, _Envrionment, include: "All_da_things"); } catch (NotSupportedException ex) { Assert.AreEqual(ex.Message, "If provided, `include` must be one of the following: inactive,deleted,inactiveAndDeleted"); } }
public void StudySubjectsRequest_can_omit_subject_key_type() { var request = new StudySubjectsRequest(ProjectName, _Envrionment); Assert.IsFalse(request.UrlPath().Contains("subjectKeyType")); }
public void StudySubjectsRequest_can_request_status() { var request = new StudySubjectsRequest(ProjectName, _Envrionment, status: true); Assert.IsTrue(request.UrlPath().Contains("status=all")); }
public void StudySubjectsRequest_can_request_with_UUID() { var request = new StudySubjectsRequest(ProjectName, _Envrionment, subjectKeyType: "SubjectUUID"); Assert.IsTrue(request.UrlPath().Contains("subjectKeyType=SubjectUUID")); }