I have a mock that i have setup like this. I need to return the same value that was passed in to .CreatePersonName
mock.Setup(m => m.CreatePersonName(It.IsAny<PersonName>()))
.Returns(// what do i put here?);
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());