private static void SetupMockPropWrapper(PropertyWrapper propertyWrapper, TypeWrapper ownerType, TypeWrapper relatedType, string relationshipName, string reverseRelName) { propertyWrapper.SetName(relationshipName); propertyWrapper.SetDeclaringType(ownerType); propertyWrapper.SetOneToOneReverseRelName(reverseRelName); propertyWrapper.SetRelatedType(relatedType); propertyWrapper.Stub(wrapper => wrapper.HasSingleReverseRelationship).Return(true); propertyWrapper.Stub(wrapper1 => wrapper1.IsPublic).Return(true); propertyWrapper.Stub(wrapper => wrapper.PropertyInfo).Return(MockRepository.GenerateMock<FakePropertyInfo>()); }