public void AddNgramsToTable_Digrams_Verify(string tableName)
        {
            var ngrams = new List <NGram>
            {
                new NGram(10, new List <string> {
                    "small", "cat"
                }),
                new NGram(10, new List <string> {
                    "big", "cat"
                })
            };

            const string commandText = "ss";

            var dataAccessMock = new Mock <IDataAccess>();

            dataAccessMock.Setup(m => m.ExecuteNonQueryDb(commandText)).Verifiable();

            var queryProviderMock = new Mock <IQueryProvider>();

            queryProviderMock.Setup(m => m.InsertNgramsString(tableName, ngrams)).Returns(commandText);

            var creator = new NgramsDataBaseCreator(dataAccessMock.Object, queryProviderMock.Object);

            creator.AddNgramsToTable(tableName, ngrams);

            dataAccessMock.Verify();
        }
        public void AddNgramsToTable_NullNgrams_Verify(string tableName)
        {
            var dataAccessMock = new Mock <IDataAccess>();

            var queryProviderMock = new Mock <IQueryProvider>();

            var creator = new NgramsDataBaseCreator(dataAccessMock.Object, queryProviderMock.Object);

            creator.AddNgramsToTable(tableName, null);

            dataAccessMock.Verify(m => m.ExecuteNonQueryDb(It.IsAny <string>()), Times.Never);
        }