/// <inheritdoc /> public WhenRecordingNewConsent_ForAnExistingStudySubject_WithoutActiveConsent() { A.CallTo(() => Consents.FindActiveConsent(StudySubject)) .Returns(null); RecordConsent( Evidences.ServerMedwayDto(takenBy: "Peter Crowther"), 2.January(1837)); }
/// <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); }
/// <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), } }; }