示例#1
0
            public void GhostTest()
            {
                GhostA          ghostA            = new GhostA();
                IGpiA           gpiA              = ghostA;
                IGhost          ghost             = ghostA;
                PropertyInfo    addSupplyProperty = null;
                PassageCallback addSupplyPassage  = null;

                ghost.AddSupplyNoitfierEvent += (property, passage) =>
                {
                    addSupplyProperty = property;
                    addSupplyPassage  = passage;
                };
                IGpiB gPi = null;

                gpiA.GpiBs.Supply += (gpi) =>
                {
                    gPi = gpi;
                };

                SoulB soulB = new SoulB();

                addSupplyPassage(soulB);


                NUnit.Framework.Assert.AreEqual(soulB, gPi);
            }
示例#2
0
 public SoulA()
 {
     this.SoulB = new SoulB();
 }