protected override void AssertObjectsAreReadable(IExtObjectContainer objectContainer
     )
 {
     var holder = RetrieveHolderInstance(objectContainer);
     objectContainer.Activate(holder, int.MaxValue);
     AssertValues(objectContainer, holder._values);
     AssertArrays(objectContainer, holder._arrays);
     AssertQueries(objectContainer);
 }
Exemple #2
0
 protected override void AssertObjectsAreReadable(IExtObjectContainer objectContainer
                                                  )
 {
     HandlerUpdateTestCaseBase.Holder holder = RetrieveHolderInstance(objectContainer);
     objectContainer.Activate(holder, int.MaxValue);
     AssertValues(objectContainer, holder._values);
     AssertArrays(objectContainer, holder._arrays);
     AssertQueries(objectContainer);
 }
Exemple #3
0
        public virtual void TestActivate()
        {
            EmbeddedClientObjectContainerTestCase.Item storedItem = StoreItemToClient1AndCommit
                                                                        ();
            long id = _client1.GetID(storedItem);

            EmbeddedClientObjectContainerTestCase.Item retrievedItem = (EmbeddedClientObjectContainerTestCase.Item
                                                                        )_client2.GetByID(id);
            Assert.IsNull(retrievedItem._name);
            Assert.IsFalse(_client2.IsActive(retrievedItem));
            _client2.Activate(retrievedItem, 1);
            Assert.AreEqual(OriginalName, retrievedItem._name);
            Assert.IsTrue(_client2.IsActive(retrievedItem));
        }
		public virtual void Conc(IExtObjectContainer oc)
		{
			IQuery q = oc.Query();
			q.Constrain(typeof(CascadeOnActivateTestCase.Item));
			q.Descend("name").Constrain("1");
			IObjectSet os = q.Execute();
			CascadeOnActivateTestCase.Item item = (CascadeOnActivateTestCase.Item)os.Next();
			CascadeOnActivateTestCase.Item item3 = item.child.child;
			Assert.AreEqual("3", item3.name);
			oc.Deactivate(item, int.MaxValue);
			Assert.IsNull(item3.name);
			oc.Activate(item, 1);
			Assert.AreEqual("3", item3.name);
		}
 public virtual void Conc(IExtObjectContainer oc)
 {
     var q = oc.Query();
     q.Constrain(typeof (Item));
     q.Descend("name").Constrain("1");
     var os = q.Execute();
     var item = (Item) os.Next();
     var item3 = item.child.child;
     Assert.AreEqual("3", item3.name);
     oc.Deactivate(item, int.MaxValue);
     Assert.IsNull(item3.name);
     oc.Activate(item, 1);
     Assert.AreEqual("3", item3.name);
 }
Exemple #6
0
        public virtual void Conc(IExtObjectContainer oc)
        {
            IQuery q = oc.Query();

            q.Constrain(typeof(CascadeOnActivateTestCase.Item));
            q.Descend("name").Constrain("1");
            IObjectSet os = q.Execute();

            CascadeOnActivateTestCase.Item item  = (CascadeOnActivateTestCase.Item)os.Next();
            CascadeOnActivateTestCase.Item item3 = item.child.child;
            Assert.AreEqual("3", item3.name);
            oc.Deactivate(item, int.MaxValue);
            Assert.IsNull(item3.name);
            oc.Activate(item, 1);
            Assert.AreEqual("3", item3.name);
        }
Exemple #7
0
        public virtual void Conc(IExtObjectContainer oc)
        {
            var q = oc.Query();

            q.Constrain(typeof(Item));
            q.Descend("name").Constrain("1");
            var os    = q.Execute();
            var item  = (Item)os.Next();
            var item3 = item.child.child;

            Assert.AreEqual("3", item3.name);
            oc.Deactivate(item, int.MaxValue);
            Assert.IsNull(item3.name);
            oc.Activate(item, 1);
            Assert.AreEqual("3", item3.name);
        }
Exemple #8
0
        public virtual void Conc(IExtObjectContainer oc)
        {
            var em = new ExtMethodsTestCase();

            oc.Store(em);
            Assert.IsFalse(oc.IsClosed());
            Assert.IsTrue(oc.IsActive(em));
            Assert.IsTrue(oc.IsStored(em));
            oc.Deactivate(em, 1);
            Assert.IsTrue(!oc.IsActive(em));
            oc.Activate(em, 1);
            Assert.IsTrue(oc.IsActive(em));
            var id = oc.GetID(em);

            Assert.IsTrue(oc.IsCached(id));
            oc.Purge(em);
            Assert.IsFalse(oc.IsCached(id));
            Assert.IsFalse(oc.IsStored(em));
            Assert.IsFalse(oc.IsActive(em));
            oc.Bind(em, id);
            Assert.IsTrue(oc.IsCached(id));
            Assert.IsTrue(oc.IsStored(em));
            Assert.IsTrue(oc.IsActive(em));
            var em2 = (ExtMethodsTestCase)oc.GetByID(id);

            Assert.AreSame(em, em2);
            // Purge all and try again
            oc.Purge();
            Assert.IsTrue(oc.IsCached(id));
            Assert.IsTrue(oc.IsStored(em));
            Assert.IsTrue(oc.IsActive(em));
            em2 = (ExtMethodsTestCase)oc.GetByID(id);
            Assert.AreSame(em, em2);
            oc.Delete(em2);
            oc.Commit();
            Assert.IsFalse(oc.IsCached(id));
            Assert.IsFalse(oc.IsStored(em2));
            Assert.IsFalse(oc.IsActive(em2));
            // Null checks
            Assert.IsFalse(oc.IsStored(null));
            Assert.IsFalse(oc.IsActive(null));
            Assert.IsFalse(oc.IsCached(0));
        }
Exemple #9
0
		public virtual void Conc(IExtObjectContainer oc)
		{
			ExtMethodsTestCase em = new ExtMethodsTestCase();
			oc.Store(em);
			Assert.IsFalse(oc.IsClosed());
			Assert.IsTrue(oc.IsActive(em));
			Assert.IsTrue(oc.IsStored(em));
			oc.Deactivate(em, 1);
			Assert.IsTrue(!oc.IsActive(em));
			oc.Activate(em, 1);
			Assert.IsTrue(oc.IsActive(em));
			long id = oc.GetID(em);
			Assert.IsTrue(oc.IsCached(id));
			oc.Purge(em);
			Assert.IsFalse(oc.IsCached(id));
			Assert.IsFalse(oc.IsStored(em));
			Assert.IsFalse(oc.IsActive(em));
			oc.Bind(em, id);
			Assert.IsTrue(oc.IsCached(id));
			Assert.IsTrue(oc.IsStored(em));
			Assert.IsTrue(oc.IsActive(em));
			ExtMethodsTestCase em2 = (ExtMethodsTestCase)oc.GetByID(id);
			Assert.AreSame(em, em2);
			// Purge all and try again
			oc.Purge();
			Assert.IsTrue(oc.IsCached(id));
			Assert.IsTrue(oc.IsStored(em));
			Assert.IsTrue(oc.IsActive(em));
			em2 = (ExtMethodsTestCase)oc.GetByID(id);
			Assert.AreSame(em, em2);
			oc.Delete(em2);
			oc.Commit();
			Assert.IsFalse(oc.IsCached(id));
			Assert.IsFalse(oc.IsStored(em2));
			Assert.IsFalse(oc.IsActive(em2));
			// Null checks
			Assert.IsFalse(oc.IsStored(null));
			Assert.IsFalse(oc.IsActive(null));
			Assert.IsFalse(oc.IsCached(0));
		}