public static void MapWithNoConstructorArguments() { var source = new SourceForMultipleConstructors { Id = 3 }; var destination = source.MapToDestinationWithMultipleConstructors(); Assert.Multiple(() => { Assert.That(destination.ConstructorA, Is.Null); Assert.That(destination.ConstructorB, Is.EqualTo(Guid.Empty)); Assert.That(destination.Id, Is.EqualTo(source.Id)); }); }
public static void MapWithTwoConstructorArguments() { var source = new SourceForMultipleConstructors { Id = 3 }; var b = Guid.NewGuid(); var destination = source.MapToDestinationWithMultipleConstructors("a", b); Assert.Multiple(() => { Assert.That(destination.ConstructorA, Is.EqualTo("a")); Assert.That(destination.ConstructorB, Is.EqualTo(b)); Assert.That(destination.Id, Is.EqualTo(source.Id)); }); }