Esempio n. 1
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));
        }
Esempio n. 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));
        }
Esempio n. 3
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));
        }
Esempio n. 4
0
        public string InserirCampoDB(string customFieldName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/CustomField/inseriCampo.sql", Encoding.UTF8);

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

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

            return(DataBaseHelpers.ObtemRegistroUnico <string>(query));
        }
Esempio n. 5
0
        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));
        }
Esempio n. 6
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));
        }
Esempio n. 7
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));
        }
Esempio n. 8
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));
        }
Esempio n. 9
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));
        }
Esempio n. 10
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));
        }