public void GivenPropertyAccessorWithDifferentResponseEntrySetter_WhenHashCodeIsComputed_ThenHashCodeShouldBeDifferent() { FhirTransactionRequestResponsePropertyAccessor anotherPatientPropertyAccessor = CreatePropertyAccesor( responseEntrySetter: (response, responseEntry) => response.ImagingStudy = responseEntry); Assert.NotEqual(_patientPropertyAccessor.GetHashCode(), anotherPatientPropertyAccessor.GetHashCode()); }
public void GivenPropertyAccessorWithDifferentPropertyName_WhenHashCodeIsComputed_ThenHashCodeShouldBeDifferent() { FhirTransactionRequestResponsePropertyAccessor anotherPatientPropertyAccessor = CreatePropertyAccesor( propertyName: "ImagingStudy"); Assert.NotEqual(_patientPropertyAccessor.GetHashCode(), anotherPatientPropertyAccessor.GetHashCode()); }
private void ExecuteAndValidatePropertyGetter(string propertyName, FhirTransactionRequestEntry expectedEntry) { FhirTransactionRequestResponsePropertyAccessor propertyAccessor = GetPropertyAccessor(propertyName); FhirTransactionRequestEntry requestEntry = propertyAccessor.RequestEntryGetter(_fhirTransactionRequest); Assert.Same(expectedEntry, requestEntry); }
private FhirTransactionResponseEntry ExecutePropertySetter(string propertyName) { FhirTransactionRequestResponsePropertyAccessor propertyAccessor = GetPropertyAccessor(propertyName); var expectedResponse = new FhirTransactionResponseEntry(new Bundle.ResponseComponent(), new Patient()); propertyAccessor.ResponseEntrySetter(_fhirTransactionResponse, expectedResponse); return(expectedResponse); }
public void GivenSamePropertyAccessor_WhenHashCodeIsComputed_ThenHashCodeShouldBeTheSame() { FhirTransactionRequestResponsePropertyAccessor anotherPatientPropertyAccessor = CreatePropertyAccesor(); Assert.Equal(_patientPropertyAccessor.GetHashCode(), anotherPatientPropertyAccessor.GetHashCode()); }
public FhirTransactionRequestResponsePropertyAccessorTests() { _patientPropertyAccessor = CreatePropertyAccesor(); }