Ejemplo n.º 1
0
 public void CreatePptp()
 {
     using (var sshNewServer = new LibLogic.Ssh.FakeSsh())
         using (var sshRevokeServer = new LibLogic.Ssh.FakeSsh())
         {
             var ppt = new LibLogic.Ppp.ManagePPTP(2, 1, sshNewServer, sshRevokeServer);
             ppt.AddUser();
         }
 }
Ejemplo n.º 2
0
 public void CreateCert()
 {
     using (var sshNewServer = new LibLogic.Ssh.FakeSsh())
         using (var sshRevokeServer = new LibLogic.Ssh.FakeSsh())
             using (var sftp = new LibLogic.Ssh.FakeSftp())
             {
                 var certs = new LibLogic.OpenVpn.CertsOpenVpnGenerateCommand(2, 1, sshNewServer, sshRevokeServer, sftp);
                 certs.Execute();
             }
 }
Ejemplo n.º 3
0
        public void InactiveAccount()
        {
            using (var sshClient = new LibLogic.Ssh.FakeSsh(LibLogic.Ssh.FakeSsh.TestingScenerios.OpenVpnHappyPath))
                using (var sshRevokeClient = new LibLogic.Ssh.FakeSsh(LibLogic.Ssh.FakeSsh.TestingScenerios.OpenVpnHappyPath))
                    using (var sftpClient = new LibLogic.Ssh.FakeSftp())
                    {
                        var vpn = new LibLogic.OpenVpn.CertsOpenVpnGenerateCommand(this.userid, this.vpnseverid,
                                                                                   sshClient, sshRevokeClient, sftpClient);

                        vpn.Execute();
                    }
        }
Ejemplo n.º 4
0
        public void GenerateCertHappyPath()
        {
            var pay = new LibLogic.Payments.Payment(this.userid);

            pay.SaveUserPayment(5, DateTime.UtcNow, LibLogic.Helpers.SiteInfo.MonthlyPaymentId);

            using (var sshClient = new LibLogic.Ssh.FakeSsh(LibLogic.Ssh.FakeSsh.TestingScenerios.OpenVpnHappyPath))
                using (var sshRevokeClient = new LibLogic.Ssh.FakeSsh(LibLogic.Ssh.FakeSsh.TestingScenerios.OpenVpnHappyPath))
                    using (var sftpClient = new LibLogic.Ssh.FakeSftp())
                    {
                        var vpn = new LibLogic.OpenVpn.CertsOpenVpnGenerateCommand(this.userid, this.vpnseverid,
                                                                                   sshClient, sshRevokeClient, sftpClient);

                        vpn.Execute();
                    }
        }