Exemple #1
0
        public void Enumerable_ShouldContain_ExpectedNumberOfOptions()
        {
            // Arrange
            _config.TlsExportCertFolder = "ExportCert";
            _config.TlsVerifyExePath    = "ProtonVPN.TlsVerify.exe";
            var subject = new TlsVerifyArguments(_config, "nl-101.proton.com");

            // Act
            var result = subject.ToList();

            // Assert
            result.Should().HaveCount(3);
        }
Exemple #2
0
        public void Enumerable_ShouldContain_TlsVerifyOption()
        {
            // Arrange
            const string tlsVerifyExePath = "C:\\Program Files\\TlsVerify.exe";

            _config.TlsExportCertFolder = "ExportCert";
            _config.TlsVerifyExePath    = tlsVerifyExePath;
            var subject = new TlsVerifyArguments(_config, "gb-15.proton.com");

            // Act
            var result = subject.ToList();

            // Assert
            result.Should().Contain($"--tls-verify \"{tlsVerifyExePath}\"");
        }
Exemple #3
0
        public void Enumerable_ShouldContain_TlsExportCertOption()
        {
            // Arrange
            const string exportCertFolder = "C:\\ProgramData\\ExportCert";

            _config.TlsExportCertFolder = exportCertFolder;
            _config.TlsVerifyExePath    = "ProtonVPN.TlsVerify.exe";
            var subject = new TlsVerifyArguments(_config, "gb-15.proton.com");

            // Act
            var result = subject.ToList();

            // Assert
            result.Should().Contain($"--tls-export-cert \"{exportCertFolder}\"");
        }
Exemple #4
0
        public void Enumerable_ShouldContain_SetEnvOption()
        {
            // Arrange
            const string serverName = "nl-1.proton.com";

            _config.TlsExportCertFolder = "ExportCert";
            _config.TlsVerifyExePath    = "ProtonVPN.TlsVerify.exe";
            var subject = new TlsVerifyArguments(_config, serverName);

            // Act
            var result = subject.ToList();

            // Assert
            result.Should().Contain($"--setenv peer_dns_name \"{serverName}\"");
        }