コード例 #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");
 }