예제 #1
0
        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;
            }
        }
예제 #2
0
 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);
 }
예제 #3
0
        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);
            }
        }
예제 #4
0
 public void InitializeTest( )
 {
     schema = SchemaTests.CreateSchema(ID);
 }
예제 #5
0
 public void TestInitialize( )
 {
     schema = SchemaTests.CreateSchema(ID);
 }
예제 #6
0
 public void InitializeTest( )
 {
     schema  = SchemaTests.CreateSchema(ID);
     indexer = GetIndexer(schema);
 }