Example #1
0
 public void FixedSizeManyTest(int howMany)
 {
     using (var session = new SessionNoServer(systemDir))
     {
         session.BeginUpdate();
         FixedSize fixedSize;
         FixedSize fixedSizePrior = new FixedSize();
         for (int i = 0; i < howMany; i++)
         {
             fixedSize = new FixedSize();
             fixedSize.Persist(session, fixedSizePrior);
             fixedSizePrior = fixedSize;
         }
         session.Commit();
     }
     using (var session = new SessionNoServerShared(systemDir))
     {
         session.BeginRead();
         Database db = session.OpenDatabase(FixedSize.PlaceInDatabase);
         foreach (Page page in db)
         {
             if (page.PageNumber > 0)
             {
                 foreach (FixedSize fixedSize in page)
                 {
                     --howMany;
                     Assert.NotNull(fixedSize);
                 }
             }
         }
         session.Commit();
     }
 }