Moq - Need mocked function to return value passed in

Solution 1:

mock.Setup(m => m.CreatePersonName(It.IsAny<PersonName>()))
            .Returns((PersonName p) => p);

Based on:

// access invocation arguments when returning a value
mock.Setup(x => x.DoSomething(It.IsAny<string>()))
                .Returns((string s) => s.ToLower());

from https://github.com/Moq/moq4/wiki/Quickstart