public void ObexPush() { BluetoothEndPoint ep = new BluetoothEndPoint( new BluetoothAddress(TestBluetoothAddress.Ctor.SixLengthBytes), BluetoothService.ObexObjectPush); String result = ep.ToString(); const String expected = TestBluetoothAddress.Ctor.SixLengthString + ":" + GuidOppAsString; Assert.AreEqual(expected, result); }
public void SerialPort() { BluetoothEndPoint ep = new BluetoothEndPoint( new BluetoothAddress(TestBluetoothAddress.Ctor.SixLengthBytes), BluetoothService.SerialPort); String result = ep.ToString(); const String expected = TestBluetoothAddress.Ctor.SixLengthString + ":" + GuidSerialPortAsString; Assert.AreEqual(expected, result); }
public void EmptyWithZeroPort() { BluetoothEndPoint ep = new BluetoothEndPoint( new BluetoothAddress(TestBluetoothAddress.Ctor.SixLengthBytes), BluetoothService.Empty, 0); String result = ep.ToString(); const String expected = TestBluetoothAddress.Ctor.SixLengthString + ":" + "0"; Assert.AreEqual(expected, result); }
private void SetupListener(BluetoothEndPoint bep, out BluetoothEndPoint liveLocalEP) { if (bep == null) { throw new ArgumentNullException("bep"); } int requestedScn; if ((bep.Port == 0 || bep.Port == -1)) { // Let the stack choose one requestedScn = 0; } else { // Requesting a specific port, check it's valid. VerifyPortIsInRange(bep); requestedScn = bep.Port; } // SetupListener(bep, requestedScn, out liveLocalEP); Debug.Assert(liveLocalEP != null, "null: out liveLocalEP!!!"); Debug.WriteLine("Listening on " + liveLocalEP.ToString()); }