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

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

            egg.Knock += args => flag = args.Type == NestEggEventType.Moved && args.From == nest && args.To == nest2;
            nest.Add(egg);
            nest.MoveTo(egg, nest2);
            Assert.True(flag);
            Assert.IsNotNull(nest2.GetNested <TestEgg>());
        }