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"); }
public void GetDisplayName_WrappedMethodCallWithTwoArguments_ReturnsMemberName() { ExpressionUtils.GetDisplayName <Isolate, object>(x => ConditionalReturn(x.Patient.Initials, x)) .Should() .Be("Initials"); }
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"); }
public void GetDisplayName_DoubleWrappedMethodCall_ReturnsMemberName() { ExpressionUtils.GetDisplayName <Isolate, object>(x => Identity((double)x.Patient.Age)) .Should().Be("Alter"); }
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"); }