Mocking an interface derived from IList to pass it to Should().BeEquivalentTo()

I am currently testing a method that returns an instance of the IBuilding interface defined like this: public interface IBuilding { public string Name { get; set; } public IBuildingZones Zones { get; set; } } public interface IBuildingZones: IList<IBuildingZone> { public void SortByElevation(); } public interface IBuildingZone { public string Name { get; set;… Read More Mocking an interface derived from IList to pass it to Should().BeEquivalentTo()

Compare 2 not identical DTO but have common properties in Fluent Assertion

I am writing a unit test for a manual mapper. It maps an object to two different classes but have common properties. how to compare if their properties are equal in fluent assertion? This is what I tried var domain = new Domain.ConsentDefinition() { SomeProperty = 1, ListOfFirstDTO = new List<FirstDTO>() { new FirstDTO() {… Read More Compare 2 not identical DTO but have common properties in Fluent Assertion