public void InsertWithIndexedFieldDefined( ) { var schema = SchemaTests.CreateSchema(ID) .Configure(f => f[3].Attributes |= Attribs.Index); var tCache = GetTableCache(1); var inserter = GetInserter(schema, tCache); var indexer = GetIndexer(schema); //var expIdxList = TableTests.TestData // .Select(r => new { // row = (int)r[0], // name = (string)r[3] // }) // // index should collate a distinct list of key values & row IDs // .GroupBy(key => key.name, index => index.row) // .ToDictionary(k => k.Key, v => v.ToList()); var rowId = 1; foreach (var d in TableTests.TestData) { inserter.Insert(indexer, d); Assert.AreEqual(rowId, inserter.CurrentRowId); ++rowId; } }
public void InitializeTest( ) { // reset cache starting row id rowIdMap[cache] = 1; // rebuild unaltered schema schema = SchemaTests.CreateSchema(ID); // would be nice to be able to mock this (hint-hint) indexer = GetIndexer(schema); }
private void InitializeTable( ) { schema = SchemaTests.CreateSchema(ID) .Configure(f => f[3].Attributes |= Attribs.Index); persons = new Table("People", SchemaTests.CreateSchema(ID), 1); foreach (var d in data) { persons.Insert(d); } }
public void InitializeTest( ) { schema = SchemaTests.CreateSchema(ID); }
public void TestInitialize( ) { schema = SchemaTests.CreateSchema(ID); }
public void InitializeTest( ) { schema = SchemaTests.CreateSchema(ID); indexer = GetIndexer(schema); }