Esempio n. 1
0
        public void Test_PokerAction()
        {
            metagame.PokerAction o1  = metagame.PokerAction.c(0, -15.3);
            metagame.PokerAction o2  = null;
            remote.PokerAction   rm1 = new remote.PokerAction();
            rm1.ToRemote(o1);
            using (MemoryStream s = new MemoryStream())
            {
                Serializer.Serialize(s, rm1);

                s.Seek(0, SeekOrigin.Begin);
                remote.PokerAction rm2 = Serializer.Deserialize <remote.PokerAction>(s);
                o2 = rm2.FromRemote();
            }
            Assert.IsNotNull(o2);
            Assert.AreEqual(o1, o2);
        }