<commit_before>﻿using System;

namespace tSQLt.Client.Net
{
    static class Queries
    {
        public static string GetQueryForAll()
        {
            return "exec tSQLt.RunAll";
        }


        public static string GetQueryForJustResults()
        {
            return "exec tSQLt.XmlResultFormatter";
        }

        public static string GetQueryForSingleTest(string testClass, string name)
        {
            testClass = QuoteName(testClass);
            name = QuoteName(name);

            return String.Format("exec tSQLt.RunWithXmlResults '{0}.{1}'", testClass, name);
        }

        public static string GetQueryForClass(string testClass)
        {
            testClass = QuoteName(testClass);

            return String.Format("exec tSQLt.RunTestClass '{0}'", testClass);
        }
        public static string GetQueryForValidateClass(string testClass)
        {
            /*declare @schema_name nvarchar(255) = 'abc1'

declare @schema_count int = (select count(*) from sys.schemas where name = @schema_name);
declare @test_class_count int = (select count(*) from sys.extended_properties ep join sys.schemas s on ep.major_id = s.schema_id
	where ep.class_desc = 'SCHEMA' and ep.name = 'tSQLt.TestClass' and s.name = @schema_name);

select @schema_count schema_count, @test_class_count test_class_count
*/
        }
<commit_msg>query to validate test name<commit_after>﻿using System;

namespace tSQLt.Client.Net
{
    static class Queries
    {
        public static string GetQueryForAll()
        {
            return "exec tSQLt.RunAll";
        }


        public static string GetQueryForJustResults()
        {
            return "exec tSQLt.XmlResultFormatter";
        }

        public static string GetQueryForSingleTest(string testClass, string name)
        {
            testClass = QuoteName(testClass);
            name = QuoteName(name);

            return String.Format("exec tSQLt.RunWithXmlResults '{0}.{1}'", testClass, name);
        }

        public static string GetQueryForClass(string testClass)
        {
            testClass = QuoteName(testClass);

            return String.Format("exec tSQLt.RunTestClass '{0}'", testClass);
        }
        public static string GetQueryForValidateClass(string testClass)
        {
            /*declare @schema_name nvarchar(255) = 'abc1'

declare @schema_count int = (select count(*) from sys.schemas where name = @schema_name);
declare @test_class_count int = (select count(*) from sys.extended_properties ep join sys.schemas s on ep.major_id = s.schema_id
	where ep.class_desc = 'SCHEMA' and ep.name = 'tSQLt.TestClass' and s.name = @schema_name);

select @schema_count schema_count, @test_class_count test_class_count
*/
        }

        public static string GetQueryForValidateTest(string testClass, string testName)
        {
//            declare @schema_name nvarchar(255) = 'abc'
//declare @test_name nvarchar(255) = 'def'

//declare @schema_count int = (select count(*) from sys.schemas where name = @schema_name);
//declare @test_class_count int = (select count(*) from sys.extended_properties ep join sys.schemas s on ep.major_id = s.schema_id
//    where ep.class_desc = 'SCHEMA' and ep.name = 'tSQLt.TestClass' and s.name = @schema_name);

//declare @proc_count int = coalesce((select object_id(@schema_name + '.' + @test_name)), -1)


//select @schema_count schema_count, @test_class_count test_class_count, @proc_count proc_count


        }

{'fraction_non_alphanumeric': 0.09904706901530465, 'fraction_numerical': 0.006064106266243142, 'mean_word_length': 2.831858407079646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5557625', 'n_tokens_mistral': 1050, 'n_tokens_neox': 1008, 'n_words': 260}