<commit_before>﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NSubstitute;
using DataTableWriter;
using DataTableWriter.Drivers;
using DataTableWriter.Adapters;
using DataTableWriter.Connection;
using System.Data;

namespace DataTableWriter.UnitTests.Adapters
{
    /// <summary>
    /// Summary description for DbAdapterTest
    /// </summary>
    [TestClass]
    public class DbAdapterTest
    {

        //[TestMethod]
        //public void TestConstructorShouldCallOpen()
        //{
        //    var driverSub = Substitute.For<IDbDriver>();
        //    var connectionInfoStub = Substitute.For<IDbConnectionInfo>();
        //    var connectionStub = Substitute.For<IDbConnection>();

        //    driverSub.BuildConnection(connectionInfoStub).Returns(connectionStub);
        //    var adapter = new DbAdapter(driverSub, connectionInfoStub);
        //    connectionStub.Received().Open();
        //}

        [TestMethod]
        public void TestIsConnectionOpenConnectionIsClosed()
        {

        }
    }
}<commit_msg>Add skeleton of tests to DbAdapter<commit_after>﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NSubstitute;
using DataTableWriter;
using DataTableWriter.Drivers;
using DataTableWriter.Adapters;
using DataTableWriter.Connection;
using System.Data;

namespace DataTableWriter.UnitTests.Adapters
{
    [TestClass]
    public class DbAdapterTest
    {
        [TestClass]
        public class MethodAddColumn
        {
            [TestMethod]
            public void ShouldAddColumn()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldThrowExceptionWhenErrorHappened()
            {
                Assert.Fail();
            }
        }

        [TestClass]
        public class MethodAddColumnsToTableToMatchSchema
        {

            [TestMethod]
            public void ShouldAddNonExistingColumns()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldThrowExceptionWhenTryingToAddNonNullableColumn()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldNotAddColumnsIfSchemaAlreadyContainsThem()
            {
                Assert.Fail();
            }
        }

        [TestClass]
        public class MethodCloseConnection
        {

            [TestMethod]
            public void ShouldCallConnectionClose()
            {
                Assert.Fail();
            }
        }

        [TestClass]
        public class MethodCreateTable
        {

            [TestMethod]
            public void ShouldCallDriverFunctionsWhenGenerateIdentityFalse()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldCallDriverFunctionsWhenGenerateIdentityTrue()
            {
                Assert.Fail();
            }

            [TestMethod] public void ShouldThrowExceptionWhenCouldntExecuteNonQuery()
            {
                Assert.Fail();
            }
        }

        [TestClass]
        public class MethodExistsTable
        {

            [TestMethod]
            public void ShouldReturnFalseWhenTableDoesNotExist()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldReturnTrueWhenTableDoesExist()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldThrowExceptionWhenCouldntExecuteNonQuery()
            {
                Assert.Fail();
            }
        }

        [TestClass]
        public class MethodGetSchema
        {

            [TestMethod]
            public void ShouldReturnTheTable()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldReturnTrueWhenTableDoesExist()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldThrowExceptionWhenCouldntGetTable()
            {
                Assert.Fail();
            }
        }

        [TestClass]
        public class MethodIsConnectionOpen
        {

            [TestMethod]
            public void ShouldReturnFalseWhenConnectionIsNotOpen()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldReturnTrueWhenConnectionOpen()
            {
                Assert.Fail();
            }
        }

        [TestClass]
        public class MethodOpenConnection
        {

            [TestMethod]
            public void ShouldCallConnectionOpen()
            {
                Assert.Fail();
            }

            [TestMethod]
            public void ShouldThrowExceptionIfCouldntOpenConnection()
            {
                Assert.Fail();
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.07356228408859988, 'fraction_numerical': 0.0, 'mean_word_length': 1.4330202669303016, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '3012747', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1123, 'n_words': 206}