public void MadeFreezable_Clone_ShouldWork() { var single = new SingleProperty().MakeFreezable<ISingleProperty>(); single.Access = true; ISingleProperty clone = single.CloneUnfrozen(); clone.Access.ShouldBeTrue(); clone.CanFreeze().ShouldBeTrue(); }
public void Unprepared_Clone_ShouldWork() { var single = new SingleProperty(); single.Access = true; var clone = single.CloneUnfrozen<ISingleProperty>(); clone.Access.ShouldBeTrue(); clone.CanFreeze().ShouldBeTrue(); }
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(); }