Exemple #1
0
        public void CN001_Alunos_ValidarCadastroAlunos()
        {
            var faker     = new Faker("en");
            var nameMock  = new Bogus.DataSets.Name();
            var firstName = nameMock.FirstName(Bogus.DataSets.Name.Gender.Male);
            var lastName  = nameMock.LastName(Bogus.DataSets.Name.Gender.Male);

            aluno = new AlunoMock()
            {
                CPF            = faker.Random.Long(11111111111, 99999999999).ToString(),
                RG             = faker.Random.Long(1111111, 9999999).ToString(),
                Telefone       = faker.Phone.PhoneNumber(),
                DataNascimento = "01/01/1991",
                UserName       = faker.Internet.UserName(firstName, lastName),
                Email          = faker.Internet.Email(firstName, lastName, "portabilis.com"),
                Senha          = faker.Internet.Password(8, true),
                Name           = firstName + " " + lastName
            };

            this.CN001_Alunos_AcessarCadastro();
            this.CN001_Alunos_CadastrarAluno();

            this.CN001_Alunos_AcessarCadastro();
            this.CN001_Alunos_CadastrarAluno();

            this.CN001_Alunos_ValidarAlunoCPFDuplicado();

            this.CN001_Alunos_FazerLoginAluno();
            this.CN001_Alunos_BuscarIdAluno();

            driver.Close();
        }
Exemple #2
0
        public void CN003_Matriculas_ValidarCadastroMatriculas()
        {
            driver = Application.StartApplication();

            var faker     = new Faker("en");
            var nameMock  = new Bogus.DataSets.Name();
            var firstName = nameMock.FirstName(Bogus.DataSets.Name.Gender.Male);
            var lastName  = nameMock.LastName(Bogus.DataSets.Name.Gender.Male);

            aluno = new AlunoMock()
            {
                CPF            = faker.Random.Long(11111111111, 99999999999).ToString(),
                RG             = faker.Random.Long(1111111, 9999999).ToString(),
                Telefone       = faker.Phone.PhoneNumber(),
                DataNascimento = "01/01/1991",
                UserName       = faker.Internet.UserName(firstName, lastName),
                Email          = faker.Internet.Email(firstName, lastName, "portabilis.com"),
                Senha          = faker.Internet.Password(8, true),
                Name           = firstName + " " + lastName
            };

            CN001_Alunos alunosCenary = new CN001_Alunos();

            CN001_Alunos.aluno  = aluno;
            CN001_Alunos.driver = driver;

            alunosCenary.CN001_Alunos_AcessarCadastro();
            alunosCenary.CN001_Alunos_CadastrarAluno();

            curso = new CursoMock()
            {
                Name              = "Curso " + faker.Lorem.Sentence(1),
                ValMatricula      = faker.Random.Number(50, 100).ToString(),
                ValMensalidade    = faker.Random.Number(20, 800).ToString(),
                Periodo           = "noturno",
                Descricao         = faker.Lorem.Sentence(15),
                QuantMesesDuracao = "12"
            };

            CN002_Cursos cursosCenary = new CN002_Cursos();

            CN002_Cursos.curso  = curso;
            CN002_Cursos.driver = driver;

            cursosCenary.CN002_Cursos_AcessarCadastro();
            cursosCenary.CN002_Cursos_CadastrarCurso();
            cursosCenary.CN002_Cursos_BuscarIdCurso();

            matricula = new MatriculaMock()
            {
                Ano   = "2018",
                Curso = curso.Name
            };

            this.CN003_Matriculas_AcessarCadastro();
            this.CN003_Matriculas_CadastrarMatricula();

            this.CN003_Matriculas_BuscarIdMatricula();

            matriculaAluno = new MatriculaAlunoMock()
            {
                Aluno   = aluno.Name,
                Curso   = curso.Name,
                Periodo = "noturno",
                Ano     = "2018"
            };

            this.CN003_Matriculas_AcessarCadastroAlunoDetail();
            this.CN003_Matriculas_CadastrarMatriculaAlunoDetail();

            Thread.Sleep(2000);

            this.CN003_Matriculas_AcessarCadastroAluno();
            this.CN003_Matriculas_CadastrarMatriculaAluno();

            this.CN003_Matriculas_ValidarMatriculaDuplicada();

            Application.DoLogout(driver);

            Application.DoLogin(driver, aluno.UserName, aluno.Senha);

            this.CN003_Matriculas_AcessarDetalheMatricula();

            this.CN003_Matriculas_PagarMatricula();

            driver.Navigate().GoToUrl("http://mighty-waters-85986.herokuapp.com/aluno/dashboard");

            this.CN003_Matriculas_AcessarDetalheMatricula();

            this.CN003_Matriculas_PagarMensalidade();

            this.CN003_Matriculas_ValidarPagamento();

            driver.Navigate().GoToUrl("http://mighty-waters-85986.herokuapp.com/aluno/dashboard");

            this.CN003_Matriculas_AcessarDetalheMatricula();

            //this.CN003_Matriculas_ExcluirMatricula();
        }