Example #1
0
        public void DeletarEmailUsuarioDB(string userEmail)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/deletaEmailUsuario.sql", Encoding.UTF8);

            query = query.Replace("$userEmail", userEmail);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: E-mail do usuário = " + userEmail);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #2
0
        public ProjectDomain ConsultarCategoriaDB(string categoryName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/consultaCategoria.sql", Encoding.UTF8);

            query = query.Replace("$categoryName", categoryName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da categoria = " + categoryName);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Example #3
0
        public UserDomain ConsultarUsuarioDB(string username)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/consultaUsuario.sql", Encoding.UTF8);

            query = query.Replace("$username", username);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Username = " + username);

            return(DataBaseHelpers.ObtemRegistroUnico <UserDomain>(query));
        }
Example #4
0
        public void DeletarProjetoDB(int projectId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaProjeto.sql", Encoding.UTF8);

            query = query.Replace("$projectId", projectId.ToString());

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: ID do projeto = " + projectId);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #5
0
        public ProjectDomain ConsultarVersaoProjetoDB(string versionName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/consultaVersaoProjeto.sql", Encoding.UTF8);

            query = query.Replace("$versionName", versionName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da versão criada = " + versionName);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Example #6
0
        public ProjectDomain InserirProjetoDB(string projectName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/inseriProjeto.sql", Encoding.UTF8);

            query = query.Replace("$projectName", projectName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do projeto = " + projectName);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Example #7
0
        public void DeletarCampoDB(string customFieldName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/CustomField/deletaCampo.sql", Encoding.UTF8);

            query = query.Replace("$customFieldName", customFieldName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do campo personalizado = " + customFieldName);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #8
0
        public List <string> ConsultarCampoDB(string customFieldName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/CustomField/consultaCampo.sql", Encoding.UTF8);

            query = query.Replace("$customFieldName", customFieldName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do campo personalizado = " + customFieldName);

            return(DataBaseHelpers.ObtemDados(query));
        }
        public TagDomain ConsultarTagDB(string tagName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Tags/consultaTag.sql", Encoding.UTF8);

            query = query.Replace("$tagName", tagName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da tag = " + tagName);

            return(DataBaseHelpers.ObtemRegistroUnico <TagDomain>(query));
        }
Example #10
0
        public void DeletarTagDB(string tagName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Tags/deletaTag.sql", Encoding.UTF8);

            query = query.Replace("$tagName", tagName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da tag = " + tagName);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #11
0
        public void DeletarVersaoProjetoDB(string versionName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaVersaoProjeto.sql", Encoding.UTF8);

            query = query.Replace("$versionName", versionName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da versão criada = " + versionName);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #12
0
        public void DeletarCategoriaDB(string categoryName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaCategoria.sql", Encoding.UTF8);

            query = query.Replace("$categoryName", categoryName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da categoria = " + categoryName);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #13
0
        public List <string> ConsultarProjetoAtribuidoAoUsuarioDB(int projectId, string userId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/consultaProjetoAtribuidoAoUsuario.sql", Encoding.UTF8);

            query = query.Replace("$projectId", projectId.ToString())
                    .Replace("$userId", userId);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do projeto = " + projectId + "Nome do usuário = " + userId);

            return(DataBaseHelpers.ObtemDados(query));
        }
Example #14
0
        public void DeletarProjetoAtribuidoAoUsuarioDB(int projectId, string userId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaProjetoAtribuidoAoUsuario.sql", Encoding.UTF8);

            query = query.Replace("$projectId", projectId.ToString())
                    .Replace("$userId", userId);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do projeto = " + projectId + "Nome do usuário = " + userId);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #15
0
        public void DeletarSubProjetoDB(int childId, int parentId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaSubProjeto.sql", Encoding.UTF8);

            query = query.Replace("$childId", childId.ToString())
                    .Replace("$parentId", parentId.ToString());

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Child ID = " + childId + " Parent ID = " + parentId);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #16
0
        public ProjectDomain ConsultarSubProjetoDB(int childId, int parentId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/consultaSubProjeto.sql", Encoding.UTF8);

            query = query.Replace("$childId", childId.ToString())
                    .Replace("$parentId", parentId.ToString());

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Child ID = " + childId + " Parent ID = " + parentId);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Example #17
0
        public List <string> ConsultarPerfilUsuarioDB(string platform, string os, string osVersion)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/consultaPerfilUsuario.sql", Encoding.UTF8);

            query = query.Replace("$platform", platform)
                    .Replace("$os", os)
                    .Replace("$version", osVersion);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Plataforma = " + platform + "SO = " + os + "Versão SO = " + osVersion);

            return(DataBaseHelpers.ObtemDados(query));
        }
Example #18
0
        public ProjectDomain InserirVersaoProjetoDB(int projectId, string versionName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/inseriVersaoProjeto.sql", Encoding.UTF8);

            query = query.Replace("$projectId", projectId.ToString())
                    .Replace("$versionName", versionName);


            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: ID do projeto = " + projectId + " | Nome da versão criada = " + versionName);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Example #19
0
        public void InserirSubProjetoDB(int childId, int parentId, string inheritParent)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/inseriSubProjeto.sql", Encoding.UTF8);

            query = query.Replace("$childId", childId.ToString())
                    .Replace("$parentId", parentId.ToString())
                    .Replace("$inheritParent", inheritParent);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: ID do projeto pai = " + parentId + " ID do projeto filho = " + childId);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #20
0
        public void DeletarPerfilUsuarioDB(string platform, string os, string osVersion)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/deletaPerfilUsuario.sql", Encoding.UTF8);

            query = query.Replace("$platform", platform)
                    .Replace("$os", os)
                    .Replace("$version", osVersion);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Plataforma = " + platform + "SO = " + os + "Versão SO = " + osVersion);

            DataBaseHelpers.ExecuteQuery(query);
        }
Example #21
0
        public string InserirPerfilUsuarioDB(string platform, string os, string osVersion, string description)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/inseriPerfilUsuario.sql", Encoding.UTF8);

            query = query.Replace("$platform", platform)
                    .Replace("$os", os)
                    .Replace("$version", osVersion)
                    .Replace("$description", description);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Plataforma = " + platform + "SO = " + os + "Versão SO = " + osVersion);

            return(DataBaseHelpers.ObtemRegistroUnico <string>(query));
        }
Example #22
0
        public UserDomain InserirUsuarioDB(string username, string realname, string enabled, string cookie, string email)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/inseriUsuario.sql", Encoding.UTF8);

            query = query.Replace("$username", username)
                    .Replace("$realname", realname)
                    .Replace("$enabled", enabled)
                    .Replace("$cookie", cookie)
                    .Replace("$email", email);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Username = "******" | Realname = " + realname + " | Enabled = " + enabled + " | E-mail = " + email);

            return(DataBaseHelpers.ObtemRegistroUnico <UserDomain>(query));
        }