public void GivenContentSerializerNameAttribute_WhenGetPropertyName_ThenReturnsOverridenName() { var page = new PropertyNameStrategyPage(); var result = this._sut.GetPropertyName(page.GetType().GetProperty(nameof(PropertyNameStrategyPage.Author))); result.ShouldBe("customAuthor"); }
public void GivenNoContentSerializerNameAttribute_WhenGetPropertyName_ThenReturnsDeclaredName() { var page = new PropertyNameStrategyPage(); var result = this._sut.GetPropertyName(page.GetType().GetProperty(nameof(PropertyNameStrategyPage.Heading))); result.ShouldBe("Heading"); }