public void InsertIntoPredicates_GetsSqlAndExecutesAsNonQuery() { const string sql = "sql"; const string path = @"C:\Temp\MYDATABASE.db"; A.CallTo(() => _databaseBuilder.Build(path)).Returns(_sqLiteDatabase); _database.Connect(path); var data = new List <Triple> { new Triple() }; A.CallTo(() => _sqlQueryConstructor.InsertIntoPredicatesQuery(data)).Returns(sql); _database.InsertIntoPredicates(data); A.CallTo(() => _sqlQueryConstructor.InsertIntoPredicatesQuery(data)).MustHaveHappened(); A.CallTo(() => _sqLiteDatabase.ExecuteNonQuery(sql)).MustHaveHappened(); }
public void InsertIntoPredicates(List <Triple> triples) { var sql = _sqlQueryConstructor.InsertIntoPredicatesQuery(triples); _sqLiteDatabase.ExecuteNonQuery(sql); }