Exemple #1
0
        public void EmptyNestGetter()
        {
            var nest = new Nest();

            nest.GetNested <Egg>();
            nest.Remove <Egg>();
        }
Exemple #2
0
        public void EggRemoveEvent()
        {
            var nest = new Nest();
            var egg  = new TestEgg();
            var flag = false;

            egg.Knock += args => flag = args.Type == NestEggEventType.Removed;
            nest.Add(egg);
            nest.Remove(egg);
            Assert.True(flag);
        }
Exemple #3
0
        public void EmptyNestRemoveError2()
        {
            var nest = new Nest();

            Assert.Throws <NullRefNestException>(() => nest.Remove(null));
        }
Exemple #4
0
        public void EmptyNestRemoveError()
        {
            var nest = new Nest();

            Assert.Throws <ContainNestException>(() => nest.Remove(new Egg()));
        }