I would like to check a property of a structure passed to a faked interface:
JobSpec passedJobSpec = null;
A.CallTo(() => fakeInvoker.Create(A<JobSpec>._))
.Invokes((JobSpec jobSpec) => passedJobSpec = jobSpec);
Assert.NotNull(passedJobSpec.Property1);
But I get a NullReferenceException
on accessing passedJobSpec.Property1
.
I tried a few other variations but no luck so far. Appreciate if someone could help.