Example #1
0
        public void connected()
        {
            //tcpClient();

            //Test Exception handling
            var tcpClient = new TcpClient();
            tcpClient.field("m_ClientSocket", null);
            KO2Log.Last_Exception = null;
            Assert.IsNull(tcpClient.field("m_ClientSocket"));
            Assert.IsFalse(tcpClient.connected());
            Assert.IsInstanceOf<NullReferenceException>(KO2Log.Last_Exception);
        }
Example #2
0
        public void stream()
        {
            //tcpClient();

            //Test Exception handling
            var tcpClient = new TcpClient();
            KO2Log.Last_Exception = null;
            Assert.IsNotNull(tcpClient.field("m_ClientSocket"));
            Assert.IsNull   (tcpClient.stream());
            Assert.IsInstanceOf<InvalidOperationException>(KO2Log.Last_Exception);
        }