private void Store(PartialCollectionReplicationTestCase.Data root, int depth)
        {
            IExtObjectContainer container = ContainerFor(A());

            container.Ext().Store(root, depth);
            container.Commit();
        }
Exemple #2
0
        private void AssertInstanceCount(IExtObjectContainer container, Type clazz, int expectedCount
                                         )
        {
            IStoredClass storedClazz = container.Ext().StoredClass(clazz);

            Assert.AreEqual(expectedCount, storedClazz.InstanceCount());
        }
 protected override void AssertObjectsAreReadable(IExtObjectContainer objectContainer)
 {
     if (IsEmbeeded(objectContainer))
     {
         Assert.IsTrue(
             objectContainer.Ext().StoredClass(typeof(Item)).StoredField("Typed", typeof(Guid)).HasIndex());
     }
     base.AssertObjectsAreReadable(objectContainer);
 }
 protected override void AssertObjectsAreReadable(IExtObjectContainer objectContainer)
 {
     if (IsEmbeeded(objectContainer))
     {
         Assert.IsTrue(
             objectContainer.Ext().StoredClass(typeof (Item)).StoredField("Typed", typeof (Guid)).HasIndex());
     }
     base.AssertObjectsAreReadable(objectContainer);
 }
        public virtual void TestRepeatedStore()
        {
            IExtObjectContainer client1 = Db();
            IExtObjectContainer client2 = OpenNewSession();

            CsCascadedDeleteReaddChildReferenceTestCase.ItemParent parent1 = ((CsCascadedDeleteReaddChildReferenceTestCase.ItemParent
                                                                               )RetrieveOnlyInstance(client1, typeof(CsCascadedDeleteReaddChildReferenceTestCase.ItemParent
                                                                                                                     )));
            CsCascadedDeleteReaddChildReferenceTestCase.ItemParent parent2 = ((CsCascadedDeleteReaddChildReferenceTestCase.ItemParent
                                                                               )RetrieveOnlyInstance(client2, typeof(CsCascadedDeleteReaddChildReferenceTestCase.ItemParent
                                                                                                                     )));
            client1.Ext().Store(parent1, int.MaxValue);
            client1.Commit();
            client2.Ext().Store(parent2, int.MaxValue);
            client2.Commit();
            client2.Close();
            AssertInstanceCountAndFieldIndexes(client1);
        }
Exemple #6
0
 public virtual void TestExt()
 {
     Assert.IsInstanceOf(typeof(IExtObjectContainer), _client1.Ext());
 }
		private void AssertInstanceCount(IExtObjectContainer container, Type clazz, int expectedCount
			)
		{
			IStoredClass storedClazz = container.Ext().StoredClass(clazz);
			Assert.AreEqual(expectedCount, storedClazz.InstanceCount());
		}