Esempio n. 1
0
 /// <inheritdoc />
 public WhenRecordingNewConsent_ForAnExistingStudySubject_WithoutActiveConsent()
 {
     A.CallTo(() => Consents.FindActiveConsent(StudySubject))
     .Returns(null);
     RecordConsent(
         Evidences.ServerMedwayDto(takenBy: "Peter Crowther"),
         2.January(1837));
 }
Esempio n. 2
0
            /// <inheritdoc />
            public WhenRecordingConsent_ForANewStudySubject()
            {
                newSubjectIdentifier = StudySubject.SubjectIdentifier + "New";
                newPersonId          = StudySubject.PersonId.Id + 1;
                A.CallTo(() => StudySubjects.GetStudySubject(StudyId, newSubjectIdentifier)).Returns(null);
                A.CallTo(() => StudySubjects.FindStudySubject(StudyId, new PersonIdentity(newPersonId))).Returns(null);

                A.CallTo(() => StudySubjects.AddStudySubject(A <StudySubject> ._))
                .Invokes((StudySubject created) => createdStudySubject = created);

                RecordConsent(Evidences.ServerMedwayDto(takenBy: "Michael Fish"), A.Dummy <DateTime>(), subjectIdentifier: newSubjectIdentifier, personId: newPersonId);
            }
Esempio n. 3
0
 /// <inheritdoc />
 public JsonSerializationTests(ITestOutputHelper output)
 {
     this.output        = output;
     registry           = KnownEvidence.Registry;
     serializerSettings = ConfigureJsonOptions.ConfigureSerializer(
         new JsonSerializerSettings(),
         new XunitLogger <IIdentifierValueDtoJsonConverter>(
             output,
             "test"));
     consentSpecification = new ConsentSpecification
     {
         Evidence =
             new[] {
             Evidences.ServerMedwayDto(givenBy: "Self", takenBy: "Nurse Brown"),
             Evidences.ServerImportFileDto("test.xml", line: 15, offset: 12),
         }
     };
 }