Example #1
0
        public void sealable_throws_exception_changing_after_sealed()
        {
            var sealable = new Sealable();

            sealable.Seal();
            var addon = new Addon();

            sealable.AddOrUpdate(addon);
        }
Example #2
0
        public void AddonBag_sealable()
        {
            var sealable = new Sealable();

            var addon = new Addon();

            sealable.AddOrUpdate(addon);
            Assert.AreEqual(addon, sealable.GetAddon <IAddon1>());
            Assert.AreEqual(addon, sealable.GetAddon <IAddon2>());
        }