/// <exception cref="System.Exception"></exception> protected override void Store() { for (IEnumerator holderIter = reference.GetEnumerator(); holderIter.MoveNext();) { NonPrimitiveSortingTestCase.Holder holder = ((NonPrimitiveSortingTestCase.Holder) holderIter.Current); Db().Store(holder); } }
public virtual void TestSorting() { IQuery query = Db().Query(); query.Constrain(typeof(NonPrimitiveSortingTestCase.Holder)); query.Descend("version").OrderAscending(); IList queryResult = query.Execute(); IList referenceSorted = ReferencSorting(); IEnumerator db4oIt = queryResult.GetEnumerator(); IEnumerator referenceIt = referenceSorted.GetEnumerator(); Assert.AreEqual(referenceSorted.Count, queryResult.Count); while (db4oIt.MoveNext() && referenceIt.MoveNext()) { NonPrimitiveSortingTestCase.Holder db4o = ((NonPrimitiveSortingTestCase.Holder)db4oIt .Current); NonPrimitiveSortingTestCase.Holder reference = ((NonPrimitiveSortingTestCase.Holder )referenceIt.Current); NonPrimitiveSortingTestCase.Version expected = reference.GetVersion(); Assert.AreEqual(db4o.GetVersion(), expected); } }