コード例 #1
0
        /// <exception cref="System.Exception"></exception>
        public virtual void TestTypedObjectIndex()
        {
            SlotDefragmentFixture.ForceIndex(SourceFile(), NewConfiguration());
            Db4objects.Db4o.Defragment.Defragment.Defrag(NewDefragmentConfig(SourceFile(), BackupFile
                                                                                 ()));
            IObjectContainer db    = Db4oEmbedded.OpenFile(NewConfiguration(), SourceFile());
            IQuery           query = db.Query();

            query.Constrain(typeof(SlotDefragmentFixture.Data));
            query.Descend(SlotDefragmentFixture.TypedobjectFieldname).Descend(SlotDefragmentFixture
                                                                              .PrimitiveFieldname).Constrain(SlotDefragmentFixture.Value);
            IObjectSet result = query.Execute();

            Assert.AreEqual(1, result.Count);
            db.Close();
        }
コード例 #2
0
 /// <exception cref="System.Exception"></exception>
 public override void SetUp()
 {
     new Sharpen.IO.File(SourceFile()).Delete();
     new Sharpen.IO.File(BackupFile()).Delete();
     SlotDefragmentFixture.CreateFile(SourceFile(), NewConfiguration());
 }
コード例 #3
0
 /// <exception cref="System.Exception"></exception>
 public virtual void TestWrapperIndex()
 {
     SlotDefragmentFixture.AssertIndex(SlotDefragmentFixture.WrapperFieldname, SourceFile
                                           (), FreshDb4oConfigurationProvider());
 }
コード例 #4
0
			public Data(int id, SlotDefragmentFixture.Data next)
			{
				_id = id;
				_wrapper = id;
				_next = next;
			}