Beispiel #1
0
        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");
            }
        }
Beispiel #2
0
        public void StudySubjectsRequest_can_omit_subject_key_type()
        {
            var request = new StudySubjectsRequest(ProjectName, _Envrionment);

            Assert.IsFalse(request.UrlPath().Contains("subjectKeyType"));
        }
Beispiel #3
0
        public void StudySubjectsRequest_can_request_status()
        {
            var request = new StudySubjectsRequest(ProjectName, _Envrionment, status: true);

            Assert.IsTrue(request.UrlPath().Contains("status=all"));
        }
Beispiel #4
0
        public void StudySubjectsRequest_can_request_with_UUID()
        {
            var request = new StudySubjectsRequest(ProjectName, _Envrionment, subjectKeyType: "SubjectUUID");

            Assert.IsTrue(request.UrlPath().Contains("subjectKeyType=SubjectUUID"));
        }