Skip to content

Commit

Permalink
#2334 Comparing populaitons not showing ok (#2335)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaperez1983 authored Oct 8, 2024
1 parent 6accd8e commit 04b4aa2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private string objectNameFrom(DiffItem diffItem)
displayIf<ObjectPath>(diffItem, x => ancestorDisplayName(diffItem)) ??
displayIf<ValuePoint>(diffItem, x => ancestorDisplayName(diffItem)) ??
displayIf<PathAndValueEntity>(diffItem, x => x.Name) ??
displayIf<ExtendedProperty<string>>(diffItem, x => x.DisplayName) ??
_displayNameProvider.DisplayNameFor(diffItem.Object1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,30 @@ public void the_correct_mapper_should_be_used()
{
A.CallTo(() => _pathAndValueEntityToPathElementsMapper.MapFrom(_diffItem.Object1 as InitialCondition)).MustHaveHappened();
}
}

public class When_mapping_an_extended_property : concern_for_DiffItemToDiffItemDTOMapper
{
protected override void Context()
{
base.Context();
_diffItem = new PropertyValueDiffItem
{
Object1 = new ExtendedProperty<string> { Name = "Name1", Value = "vale1" },
Object2 = new ExtendedProperty<string> { Name = "Name1", Value = "vale2" },
FormattedValue1 = "xx",
FormattedValue2 = "yy",
CommonAncestor = _container,
PropertyName = "ABC"
};
}

[Observation]
public void the_extended_property_shows_the_displayName()
{
_dto.PathElements.ShouldBeEqualTo(_pathElements);
_dto.ObjectName.ShouldBeEqualTo("Name1");
}
}

public class When_mapping_a_property_diff_item_for_an_entity_to_a_diff_item_dto : concern_for_DiffItemToDiffItemDTOMapper
Expand Down

0 comments on commit 04b4aa2

Please sign in to comment.