Ejemplo n.º 1
0
        public virtual void Test()
        {
            Assert.IsGreater(Size, FileSession().FileLength());
            Assert.IsSmaller(Size + MaximumHeaderSize, FileSession().FileLength());
            DatabaseGrowthSizeTestCase.Item item = DatabaseGrowthSizeTestCase.Item.NewItem(Size
                                                                                           );
            Store(item);
            Assert.IsGreater(Size * 2, FileSession().FileLength());
            Assert.IsSmaller(Size * 2 + MaximumHeaderSize, FileSession().FileLength());
            object retrievedItem = ((DatabaseGrowthSizeTestCase.Item)RetrieveOnlyInstance(typeof(
                                                                                              DatabaseGrowthSizeTestCase.Item)));

            Assert.AreSame(item, retrievedItem);
        }
Ejemplo n.º 2
0
 public static DatabaseGrowthSizeTestCase.Item NewItem(int payloadSize)
 {
     DatabaseGrowthSizeTestCase.Item item = new DatabaseGrowthSizeTestCase.Item();
     item._payload = new byte[payloadSize];
     return(item);
 }
			public static DatabaseGrowthSizeTestCase.Item NewItem(int payloadSize)
			{
				DatabaseGrowthSizeTestCase.Item item = new DatabaseGrowthSizeTestCase.Item();
				item._payload = new byte[payloadSize];
				return item;
			}