Ejemplo n.º 1
0
 public Wrapper(
     ModelPrivateSetGenericParent <TFirst, TSecond> privateSetGenericParent,
     ModelPrivateSetGenericParentGenericChild <TFirst, TSecond> privateSetGenericParentGenericChild)
 {
     this.PrivateSetGenericParent             = privateSetGenericParent;
     this.PrivateSetGenericParentGenericChild = privateSetGenericParentGenericChild;
 }
Ejemplo n.º 2
0
        public static void RoundtripSerialize___Should_activate_post_initialization_registration___When_type_is_a_concrete_closed_generic_declared_as_a_generic_ancestor()
        {
            // Arrange
            ModelPrivateSetGenericParent <Version, Guid> expected = new ModelPrivateSetGenericParentGenericChild <Version, Guid>(
                A.Dummy <IReadOnlyDictionary <Version, Guid> >(), A.Dummy <IReadOnlyDictionary <Version, Guid> >());

            // Act, Assert
            expected.RoundtripSerializeViaJsonWithBeEqualToAssertion(typeof(PostInitializationRegistrationJsonConfiguration));
            expected.RoundtripSerializeViaBsonWithBeEqualToAssertion(typeof(PostInitializationRegistrationBsonConfiguration));
        }
Ejemplo n.º 3
0
            public bool Equals(ModelPrivateSetGenericParentGenericChild <TFirst, TSecond> other)
            {
                if (ReferenceEquals(this, other))
                {
                    return(true);
                }

                if (ReferenceEquals(other, null))
                {
                    return(false);
                }

                var result = this.ParentGenericReadOnlyDictionaryProperty1.IsEqualTo(other.ParentGenericReadOnlyDictionaryProperty1) &&
                             this.ChildGenericReadOnlyDictionaryProperty1.IsEqualTo(other.ChildGenericReadOnlyDictionaryProperty1);

                return(result);
            }