I have two classes. SourceDto and TargetModel
public class SourceDto {
public string name {get;set;}
public bool male {get;set;}
}
public class TargetModel {
public string name {get;set;}
public string male {get;set;}
}
My mapping will return for male property "Male" when the male property of the SourceDto is true, else the result will be string.Empty.
How can I compare the content of the sourceDto and the targetModel in a test?
for example, I think I cannot use
result.Should().BeEquivalentTo(sourceDto), cause of the expected result type and value is different.
How can I check it with BeEquivalentTo maybe with the options? Thanks