public void SetsParentIdWhenPropertyExistsWhenTableNameId(SUT sut, IInvocation invocation, int farId)
        {
            var far = new Far() { FarId = farId };
            var boo = new Boo();

            invocation.InvocationTarget.Returns(far);
            invocation.ReturnValue = boo;

            sut.Intercept(invocation);

            boo.FarId.Should().Be(far.FarId);
        }
        public void SetsIdOnMatchingPropertyWhenTableNameId(SUT sut, IInvocation invocation, int booId)
        {
            var far = new Far { BooId = booId };
            var boo = new Boo();

            invocation.Method.Returns(far.GetType().GetProperty("Boo").GetGetMethod());
            invocation.InvocationTarget.Returns(far);
            invocation.ReturnValue = boo;

            sut.Intercept(invocation);

            boo.BooId.Should().Be(booId);
        }
 public void ParentIdShouldBeSameForCollectionsWhenTableNameIdForIDbSet(Boo boo)
 {
     foreach (var qix in boo.Qixes)
     {
         qix.BooId.Should().Be(boo.BooId);
     }
 }