Example #1
0
        public void WhenSealedIsImmutable()
        {
            var test = new SealableTest();

            test.Seal();
            Assert.IsTrue(test.IsSealed);

            test.Value = 1;
        }
Example #2
0
        public void CanClone()
        {
            var test = new SealableTest();

            test.Seal();
            Assert.IsTrue(test.IsSealed);

            var clone = test.Clone <SealableTest>();

            Assert.IsFalse(clone.IsSealed);

            clone.Value = 1;
            Assert.AreEqual(1, clone.Value);
        }