예제 #1
0
 public void GetDisplayName_DisplayAttribute_ReturnsDisplayName()
 {
     ExpressionUtils.GetDisplayName <Isolate, object>(x => x.SamplingLocation).Should().Be("Entnahmeort");
     ExpressionUtils.GetDisplayName <Isolate, object>(x => x.Patient).Should().Be("Der Patient");
     ExpressionUtils.GetDisplayName <Isolate, object>(x => x.Patient.Age).Should().Be("Alter");
 }
예제 #2
0
 public void GetDisplayName_WrappedMethodCallWithTwoArguments_ReturnsMemberName()
 {
     ExpressionUtils.GetDisplayName <Isolate, object>(x => ConditionalReturn(x.Patient.Initials, x))
     .Should()
     .Be("Initials");
 }
예제 #3
0
 public void GetDisplayName_WrappedMethodCall_ReturnsMemberName()
 {
     ExpressionUtils.GetDisplayName <Isolate, object>(x => Identity(x.Invasive.ToLower())).Should().Be("Invasive");
     ExpressionUtils.GetDisplayName <Isolate, object>(x => Identity(x.SamplingLocation.ToLower()))
     .Should().Be("Entnahmeort");
 }
예제 #4
0
 public void GetDisplayName_DoubleWrappedMethodCall_ReturnsMemberName()
 {
     ExpressionUtils.GetDisplayName <Isolate, object>(x => Identity((double)x.Patient.Age))
     .Should().Be("Alter");
 }
예제 #5
0
 public void GetDisplayName_NoAttribute_ReturnsMemberName()
 {
     ExpressionUtils.GetDisplayName <Isolate, object>(x => x.Invasive).Should().Be("Invasive");
     ExpressionUtils.GetDisplayName <Isolate, object>(x => x.Patient.Initials).Should().Be("Initials");
 }