<commit_before>﻿using NBi.Core.Query;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Testing.Unit.Core.Query
{
    [TestFixture]
    public class CommandBuilderTest
    {
        [Test]
        public void Build_TimeoutSpecified_TimeoutSet()
        {
            var builder = new CommandBuilder();
            var cmd = builder.Build("Data Source=server;Initial Catalog=database;Integrated Security=SSPI", "WAITFOR DELAY '00:00:15'", null, null, 5000);
            Assert.That(cmd.CommandTimeout, Is.EqualTo(5));
        }

        [Test]
        public void Build_TimeoutSetToZero_TimeoutSet30Seconds()
        {
            var builder = new CommandBuilder();
            var cmd = builder.Build("Data Source=server;Initial Catalog=database;Integrated Security=SSPI", "WAITFOR DELAY '00:00:15'", null, null, 0);
            Assert.That(cmd.CommandTimeout, Is.EqualTo(30));
        }

        [Test]
        public void Build_TimeoutSetTo30_TimeoutSet30Seconds()
        {
            var builder = new CommandBuilder();
            var cmd = builder.Build("Data Source=server;Initial Catalog=database;Integrated Security=SSPI", "WAITFOR DELAY '00:00:15'", null, null, 30000);
            Assert.That(cmd.CommandTimeout, Is.EqualTo(30));
        }
    }
}
<commit_msg>Change test to map with allign with initial design and documentation<commit_after>﻿using NBi.Core.Query;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Testing.Unit.Core.Query
{
    [TestFixture]
    public class CommandBuilderTest
    {
        [Test]
        public void Build_TimeoutSpecified_TimeoutSet()
        {
            var builder = new CommandBuilder();
            var cmd = builder.Build("Data Source=server;Initial Catalog=database;Integrated Security=SSPI", "WAITFOR DELAY '00:00:15'", null, null, 5000);
            Assert.That(cmd.CommandTimeout, Is.EqualTo(5));
        }

        [Test]
        public void Build_TimeoutSetToZero_TimeoutSet0Seconds()
        {
            var builder = new CommandBuilder();
            var cmd = builder.Build("Data Source=server;Initial Catalog=database;Integrated Security=SSPI", "WAITFOR DELAY '00:00:15'", null, null, 0);
            Assert.That(cmd.CommandTimeout, Is.EqualTo(0));
        }

        [Test]
        public void Build_TimeoutSetTo30_TimeoutSet30Seconds()
        {
            var builder = new CommandBuilder();
            var cmd = builder.Build("Data Source=server;Initial Catalog=database;Integrated Security=SSPI", "WAITFOR DELAY '00:00:15'", null, null, 30000);
            Assert.That(cmd.CommandTimeout, Is.EqualTo(30));
        }
    }
}

{'fraction_non_alphanumeric': 0.10893556425774296, 'fraction_numerical': 0.027055891776432896, 'mean_word_length': 2.952180028129395, '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': '2134204', 'n_tokens_mistral': 838, 'n_tokens_neox': 793, 'n_words': 182}