public void IsLoggedInTest()
 {
     Domain_ConnecterExtendData target = new Domain_ConnecterExtendData(); // TODO: 初始化为适当的值
     bool expected = false; // TODO: 初始化为适当的值
     bool actual;
     target.IsLoggedIn = expected;
     actual = target.IsLoggedIn;
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
 public void NetStateTest()
 {
     Domain_ConnecterExtendData target = new Domain_ConnecterExtendData(); // TODO: 初始化为适当的值
     NetState expected = null; // TODO: 初始化为适当的值
     NetState actual;
     target.NetState = expected;
     actual = target.NetState;
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="newNetState"></param>
        internal void ConnecterIniNetState(object sender, NetStateInitEventArgs netStateInit)
        {
            if (netStateInit.NetStateInit != null && netStateInit.NetStateInit.World == m_World)
            {
                // 初始化客户端
                Domain_ConnecterExtendData extendData = new Domain_ConnecterExtendData();
                extendData.NetState = netStateInit.NetStateInit;

                // 保存扩展的数据到NetState
                netStateInit.NetStateInit.RegisterComponent <Domain_ConnecterExtendData>(Domain_ConnecterExtendData.COMPONENT_ID, extendData);

                // 获取包的长度
                netStateInit.NetStateInit.ReceiveBuffer.ThreadEventPacketLength += new EventHandler <PacketLengthInfoEventArgs>(this.GetPacketLength);
            }
            else
            {
                throw new Exception("Domain.ConnecterIniNetState(...) - newNetState == null || newNetState.ExtendData != null || netStateInit.NetStateInit.World != m_World error!");
            }
        }
 public void Domain_ConnecterExtendDataConstructorTest()
 {
     Domain_ConnecterExtendData target = new Domain_ConnecterExtendData();
     Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );
 }