예제 #1
0
 public void NonExistingFieldTest()
 {
     RelayLib.RelayTwo r2 = new RelayLib.RelayTwo();
     r2.CreateTable(TingTing.Ting.TABLE_NAME);
     r2.CreateTable(TingTing.Room.TABLE_NAME);
     RoomRunner rr =  new TingTing.RoomRunner(r2);
     rr.CreateRoom<Room>(WorldCoordinate.UNDEFINED_ROOM);
     TingTing.TingRunner tr = new TingTing.TingRunner(r2,rr);
     tr.CreateTing<SomeLesserTing>("TingA", TingTing.WorldCoordinate.NONE);
     r2.GetTable(TingTing.Ting.TABLE_NAME)[0].Set<string>(TingTing.Ting.CSHARP_CLASS_FIELD_NAME, "TerreTingThongDong");
     List<TingTing.Ting> list = InstantiatorTwo.Process<TingTing.Ting>(r2.GetTable(TingTing.Ting.TABLE_NAME));
     Console.WriteLine("list length" + list.Count);
     Assert.NotNull((list[0] as TerreTingThongDong));
     Assert.AreSame("Something", (list[0] as TerreTingThongDong).funk);
 }
예제 #2
0
        public void NonExistingFieldTest()
        {
            RelayLib.RelayTwo r2 = new RelayLib.RelayTwo();
            r2.CreateTable(TingTing.Ting.TABLE_NAME);
            r2.CreateTable(TingTing.Room.TABLE_NAME);
            RoomRunner rr = new TingTing.RoomRunner(r2);

            rr.CreateRoom <Room>(WorldCoordinate.UNDEFINED_ROOM);
            TingTing.TingRunner tr = new TingTing.TingRunner(r2, rr);
            tr.CreateTing <SomeLesserTing>("TingA", TingTing.WorldCoordinate.NONE);
            r2.GetTable(TingTing.Ting.TABLE_NAME)[0].Set <string>(TingTing.Ting.CSHARP_CLASS_FIELD_NAME, "TerreTingThongDong");
            List <TingTing.Ting> list = InstantiatorTwo.Process <TingTing.Ting>(r2.GetTable(TingTing.Ting.TABLE_NAME));

            Console.WriteLine("list length" + list.Count);
            Assert.NotNull((list[0] as TerreTingThongDong));
            Assert.AreSame("Something", (list[0] as TerreTingThongDong).funk);
        }
예제 #3
0
파일: Ting.cs 프로젝트: substans/TingTing
 internal void SetupBaseRunners(TingRunner pTingRunner, RoomRunner pRoomRunner)
 {
     _roomRunner = pRoomRunner;
     _tingRunner = pTingRunner;
 }