Esempio n. 1
0
        public void ShouldAllowSettersWhenNotFrozen()
        {
            var target = new FreezableAttributes();

            target.Id   = 1;
            target.Name = "Test";
        }
Esempio n. 2
0
        public void ShouldThrowExceptionOnSettersWhenFrozen()
        {
            var target = new FreezableAttributes();

            ((IFreezable)target).Freeze();

            Assert.Throws(typeof(FrozenException), () => target.Id = 1);
        }