public void TestBinaryPathOnEmpty()
 {
     tunnel = new TunnelClass();
       tunnel.addBinaryPath("");
       string expectedPath = Path.Combine(Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%"), ".browserstack");
       expectedPath = Path.Combine(expectedPath, "BrowserStackLocal.exe");
       Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);
 }
        public void TestBinaryPathOnEmpty()
        {
            tunnel = new TunnelClass();
            tunnel.addBinaryPath("");
            string expectedPath = Path.Combine(Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%"), ".browserstack");

            expectedPath = Path.Combine(expectedPath, "BrowserStackLocal.exe");
            Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);
        }
        public void TestBinaryPathOnFallback()
        {
            string expectedPath = "dummyPath";
              tunnel = new TunnelClass();
              tunnel.addBinaryPath("dummyPath");
              Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);

              tunnel.fallbackPaths();
              expectedPath = Path.Combine(Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%"), ".browserstack");
              expectedPath = Path.Combine(expectedPath, "BrowserStackLocal.exe");
              Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);

              tunnel.fallbackPaths();
              expectedPath = Directory.GetCurrentDirectory();
              expectedPath = Path.Combine(expectedPath, "BrowserStackLocal.exe");
              Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);

              tunnel.fallbackPaths();
              expectedPath = Path.GetTempPath();
              expectedPath = Path.Combine(expectedPath, "BrowserStackLocal.exe");
              Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);
        }
        public void TestBinaryPathOnFallback()
        {
            string expectedPath = "dummyPath";

            tunnel = new TunnelClass();
            tunnel.addBinaryPath("dummyPath");
            Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);

            tunnel.fallbackPaths();
            expectedPath = Path.Combine(Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%"), ".browserstack");
            expectedPath = Path.Combine(expectedPath, "BrowserStackLocal.exe");
            Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);

            tunnel.fallbackPaths();
            expectedPath = Directory.GetCurrentDirectory();
            expectedPath = Path.Combine(expectedPath, "BrowserStackLocal.exe");
            Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);

            tunnel.fallbackPaths();
            expectedPath = Path.GetTempPath();
            expectedPath = Path.Combine(expectedPath, "BrowserStackLocal.exe");
            Assert.AreEqual(tunnel.getBinaryAbsolute(), expectedPath);
        }
 public void TestBinaryPathIsSet()
 {
     tunnel = new TunnelClass();
       tunnel.addBinaryPath("dummyPath");
       Assert.AreEqual(tunnel.getBinaryAbsolute(), "dummyPath");
 }
 public void TestBinaryPathIsSet()
 {
     tunnel = new TunnelClass();
     tunnel.addBinaryPath("dummyPath");
     Assert.AreEqual(tunnel.getBinaryAbsolute(), "dummyPath");
 }