public void TestSingle2SingleBaseDerived()
        {
            var model    = new MutableModel();
            var factory  = new PropertiesTestFactory(model);
            var base1    = factory.BaseClass();
            var derived1 = factory.DerivedClass();
            var subs     = factory.SubsettingBase2Derived();

            subs.Single2SingleBase = derived1;
            Assert.Null(subs.Single2SingleDerived);
            Assert.Equal(derived1, subs.Single2SingleBase);
            var imodel    = model.ToImmutable();
            var ibase1    = base1.ToImmutable(imodel);
            var iderived1 = derived1.ToImmutable(imodel);
            var isubs     = subs.ToImmutable(imodel);

            Assert.Null(isubs.Single2SingleDerived);
            Assert.Equal(iderived1, isubs.Single2SingleBase);
        }
        public void TestList2SetBaseDerived()
        {
            var model    = new MutableModel();
            var factory  = new PropertiesTestFactory(model);
            var base1    = factory.BaseClass();
            var derived1 = factory.DerivedClass();
            var subs     = factory.SubsettingBase2Derived();

            subs.List2SetBase.Add(derived1);
            Assert.True(subs.List2SetDerived.Count == 0);
            Assert.Contains(derived1, subs.List2SetBase);
            var imodel    = model.ToImmutable();
            var ibase1    = base1.ToImmutable(imodel);
            var iderived1 = derived1.ToImmutable(imodel);
            var isubs     = subs.ToImmutable(imodel);

            Assert.True(isubs.List2SetDerived.Count == 0);
            Assert.Contains(iderived1, isubs.List2SetBase);
        }
        public void TestSingle2ListBaseBase()
        {
            var model    = new MutableModel();
            var factory  = new PropertiesTestFactory(model);
            var base1    = factory.BaseClass();
            var derived1 = factory.DerivedClass();
            var subs     = factory.SubsettingBase2Derived();

            subs.Single2ListBase = base1;
            Assert.True(subs.Single2ListDerived.Count == 0);
            Assert.Equal(base1, subs.Single2ListBase);
            var imodel    = model.ToImmutable();
            var ibase1    = base1.ToImmutable(imodel);
            var iderived1 = derived1.ToImmutable(imodel);
            var isubs     = subs.ToImmutable(imodel);

            Assert.True(isubs.Single2ListDerived.Count == 0);
            Assert.Equal(ibase1, isubs.Single2ListBase);
        }