コード例 #1
0
        public void TCP_ToUDP()
        {
            //Arrage
            EsMount mount = new EsMount(ConnectionMethod.TCP, ipAddress: IPADDR, ipPort: IPPORT);

            //Act
            mount.Connect();
            mount.ChangeConnectionMethod(ConnectionMethod.UDP, ipAddess: IPADDR, ipPort: IPPORT);

            //Assert
            Assert.IsTrue(mount.Connected == true);
            Assert.IsTrue(mount.ConnectionMethod == ConnectionMethod.UDP);
        }
コード例 #2
0
        public void UDP_ToTCP()  //ASSUMES MOUNT IS ON A SERIAL CONNECTION
        {
            //Arrage
            EsMount mount = new EsMount(ConnectionMethod.UDP, ipAddress: IPADDR, ipPort: IPPORT);

            //Act
            mount.Connect();
            mount.ChangeConnectionMethod(ConnectionMethod.TCP, IPADDR, ipPort: IPPORT);

            //Assert
            Assert.IsTrue(mount.Connected == true);
            Assert.IsTrue(mount.ConnectionMethod == ConnectionMethod.Serial);
        }
コード例 #3
0
        public void TCP_ToSerial()
        {
            //Arrage
            EsMount mount = new EsMount(ConnectionMethod.TCP, ipAddress: IPADDR, ipPort: IPPORT);

            //Act
            mount.Connect();
            mount.ChangeConnectionMethod(ConnectionMethod.Serial, serialPort: SERIALPORT);

            //Assert
            Assert.IsTrue(mount.Connected == true);
            Assert.IsTrue(mount.ConnectionMethod == ConnectionMethod.Serial);
        }
コード例 #4
0
        public void Serial_ToUDP()
        {
            //Arrage
            EsMount mount = new EsMount(commPort: SERIALPORT);

            // SETS mount.ConnectionMethod = ConnectionMethod.Serial;
            //Act
            mount.Connect();
            mount.ChangeConnectionMethod(ConnectionMethod.UDP, ipAddess: IPADDR, ipPort: IPPORT);

            //Assert
            Assert.IsTrue(mount.Connected == true);
            Assert.IsTrue(mount.ConnectionMethod == ConnectionMethod.UDP);
        }
コード例 #5
0
        public void Serial_Connects()  //ASSUMES MOUNT IS ON A SERIAL CONNECTION
        {
            //Arrage
            EsMount mount = new EsMount(commPort: SERIALPORT);

            // SETS mount.ConnectionMethod = ConnectionMethod.Serial;

            //Act
            mount.Connect();

            //Assert
            Assert.IsTrue(mount.Connected == true);
            Assert.IsTrue(mount.ConnectionMethod == ConnectionMethod.Serial);
        }
コード例 #6
0
        public void Tcp_Connects()
        {
            //Arrage
            EsMount mount = new EsMount(ConnectionMethod.TCP, ipAddress: IPADDR, ipPort: IPPORT);

            //SETS  mount.IpAddress = "127.0.0.0";
            //SETS mount.IpPort = "1234";
            //SETS mount.ConnectionMethod = ConnectionMethod.TCP;

            //Act
            mount.Connect();

            //Assert
            Assert.IsTrue(mount.Connected == true);
            Assert.IsTrue(mount.ConnectionMethod == ConnectionMethod.TCP);
        }
コード例 #7
0
        public void UDP_Connects()  //ASSUMES MOUNT IS ON A SERIAL CONNECTION
        {
            //Arrage
            EsMount mount = new EsMount(ConnectionMethod.UDP, ipAddress: IPADDR, ipPort: IPPORT);

            //SETS mount.IpAddress = "127.0.0.0";
            //SETS mount.IpPort = "1234";
            //SETS mount.ConnectionMethod = ConnectionMethod.UDP;

            //Act
            mount.Connect();

            //Assert
            Assert.IsTrue(mount.Connected == true);
            Assert.IsTrue(mount.ConnectionMethod == ConnectionMethod.UDP);
        }
 public static EsMount  ToTcp(this EsMount mount)
 {
     throw new NotImplementedException();
 }