Apparently, I was overly optimistic about the solution. For some reason my tests are now failing, and I have tracked it down to the OpenAccess model seems to be ignoring the Mock statements.
Below is an example of my test (that was working 7 days ago :( ).
//Using the Nunit framework
// Arrange the bar mockup to be gold
var bar = Mock.Create<Bar>();
Mock.Arrange(() => bar.IsIron).IgnoreInstance().Return(
Mock.Arrange(() => bar.IsGold).IgnoreInstance().Return(
IFoo foo = FooFactory.CreateFoo(GetFirstBarKey());
// GetFirstBarKey just returns the first entry of barKey in the Bars table.
// Assert fails as the mock bar properties are not invoked.
// Assert fails as the first barkey in the bars table is NOT a golden foo.
(BarModel bm =
bm.Bars.FirstOrDefault(n => n.BarKey > 0).BarKey;
If you can offer guidance on what I am doing wrong, I would appreciate it. We did make a change to data access layer to Aggregate the models together so that they could be used in conjunction with each other, but even undoing that modification does not seem to fix the problem.