Esempio n. 1
0
        public void MadeFreezable_Clone_ShouldWork()
        {
            var single = new SingleProperty().MakeFreezable<ISingleProperty>();

            single.Access = true;

            ISingleProperty clone = single.CloneUnfrozen();
            clone.Access.ShouldBeTrue();
            clone.CanFreeze().ShouldBeTrue();
        }
Esempio n. 2
0
        public void Unprepared_Clone_ShouldWork()
        {
            var single = new SingleProperty();

            single.Access = true;

            var clone = single.CloneUnfrozen<ISingleProperty>();
            clone.Access.ShouldBeTrue();
            clone.CanFreeze().ShouldBeTrue();
        }
Esempio n. 3
0
        public void Frozen_Clone_ShouldWorkAndBeUnfrozen()
        {
            var single = new SingleProperty().MakeFreezable<ISingleProperty>();

            single.Access = true;
            single.Freeze();

            ISingleProperty clone = single.CloneUnfrozen();
            clone.Access.ShouldBeTrue();
            clone.IsFrozen().ShouldBeFalse();
        }