protected override void AssertObjectDeletion(IExtObjectContainer objectContainer)
 {
     DeletionUponFormatMigrationTestCase.Item item = ItemById(objectContainer, IdToBeDeleted
                                                              );
     Assert.IsNotNull(item._child);
     Assert.IsNotNull(item._array[0]);
     objectContainer.Delete(item);
 }
 private void AssertReferenceToDeletedObjectSetToNull(IExtObjectContainer objectContainer
                                                      )
 {
     DeletionUponFormatMigrationTestCase.Item item = ItemById(objectContainer, IdToBeKept
                                                              );
     Assert.IsNotNull(item);
     Assert.AreEqual(1, item._array.Length);
     Assert.IsNull(item._array[0]);
 }
 private DeletionUponFormatMigrationTestCase.Item[] ItemsToKeep()
 {
     DeletionUponFormatMigrationTestCase.Item[] items = new DeletionUponFormatMigrationTestCase.Item
                                                        [ItemsToKeepCount];
     for (int i = 1; i <= items.Length; i++)
     {
         items[i - 1] = new DeletionUponFormatMigrationTestCase.Item(IdToBeKept + i);
     }
     return(items);
 }
 protected override void Store(IObjectContainerAdapter objectContainer)
 {
     DeletionUponFormatMigrationTestCase.Item item1 = new DeletionUponFormatMigrationTestCase.Item
                                                          (IdToBeDeleted, new DeletionUponFormatMigrationTestCase.ChildItem(ChildToBeDelete
                                                                                                                            ), ItemsToKeep());
     objectContainer.Store(item1, 10);
     DeletionUponFormatMigrationTestCase.Item item2 = new DeletionUponFormatMigrationTestCase.Item
                                                          (IdToBeKept, new DeletionUponFormatMigrationTestCase.ChildItem(ChildToBeKept), new
                                                          DeletionUponFormatMigrationTestCase.Item[] { item1 });
     objectContainer.Store(item2, 10);
 }
 public override bool Equals(object obj)
 {
     if (obj == null)
     {
         return(false);
     }
     if (!obj.GetType().Equals(typeof(DeletionUponFormatMigrationTestCase.Item)))
     {
         return(false);
     }
     DeletionUponFormatMigrationTestCase.Item other = (DeletionUponFormatMigrationTestCase.Item
                                                       )obj;
     return(other._id == _id);
 }
		private DeletionUponFormatMigrationTestCase.Item[] ItemsToKeep()
		{
			DeletionUponFormatMigrationTestCase.Item[] items = new DeletionUponFormatMigrationTestCase.Item
				[ItemsToKeepCount];
			for (int i = 1; i <= items.Length; i++)
			{
				items[i - 1] = new DeletionUponFormatMigrationTestCase.Item(IdToBeKept + i);
			}
			return items;
		}
		protected override void Store(IObjectContainerAdapter objectContainer)
		{
			DeletionUponFormatMigrationTestCase.Item item1 = new DeletionUponFormatMigrationTestCase.Item
				(IdToBeDeleted, new DeletionUponFormatMigrationTestCase.ChildItem(ChildToBeDelete
				), ItemsToKeep());
			objectContainer.Store(item1, 10);
			DeletionUponFormatMigrationTestCase.Item item2 = new DeletionUponFormatMigrationTestCase.Item
				(IdToBeKept, new DeletionUponFormatMigrationTestCase.ChildItem(ChildToBeKept), new 
				DeletionUponFormatMigrationTestCase.Item[] { item1 });
			objectContainer.Store(item2, 10);
		}