Esempio n. 1
0
        public virtual void TestActivateDefaultMode()
        {
            LinkedArrays linkedArrays = Root();

            Db().Activate(linkedArrays);
            linkedArrays.AssertActivationDepth(TestedDepth - 1, true);
        }
Esempio n. 2
0
        /// <exception cref="System.Exception"></exception>
        protected override void Store()
        {
            LinkedArrays linkedArrays = LinkedArrays.NewLinkedArrayRoot(TestedDepth);

            Store(linkedArrays);
            _linkedArraysUUID = Db().GetObjectInfo(linkedArrays).GetUUID();
        }
Esempio n. 3
0
 public virtual void TestTheTest()
 {
     for (int depth = 1; depth < TestedDepth; depth++)
     {
         LinkedArrays linkedArrays = LinkedArrays.NewLinkedArrays(depth);
         linkedArrays.AssertActivationDepth(depth - 1, false);
     }
 }
Esempio n. 4
0
        public virtual void TestActivateFixedDepth()
        {
            LinkedArrays linkedArrays = Root();

            for (int depth = 0; depth < TestedDepth; depth++)
            {
                Db().Activate(linkedArrays, depth);
                linkedArrays.AssertActivationDepth(depth, false);
                Db().Deactivate(linkedArrays, int.MaxValue);
            }
        }
Esempio n. 5
0
        public virtual void TestPeekPersisted()
        {
            LinkedArrays linkedArrays = Root();

            for (int depth = 0; depth < TestedDepth; depth++)
            {
                LinkedArrays peeked = (LinkedArrays)((LinkedArrays)Db().PeekPersisted(linkedArrays
                                                                                      , depth, true));
                peeked.AssertActivationDepth(depth, false);
            }
        }
Esempio n. 6
0
        public virtual void TestTransparentActivationTraversal()
        {
            LinkedArrays root = QueryForRoot();

            LinkedArrays.ActivatableItem activatableItem = root._activatableItemArray[0];
            activatableItem.Activate(ActivationPurpose.Read);
            LinkedArrays descendant = activatableItem._linkedArrays;

            descendant.AssertActivationDepth(TestedDepth - 3, true);
            Db().Deactivate(activatableItem, 1);
            activatableItem.Activate(ActivationPurpose.Read);
            descendant.AssertActivationDepth(TestedDepth - 3, true);
        }
Esempio n. 7
0
        public virtual void TestActivatingActive()
        {
            LinkedArrays linkedArrays = Root();

            for (int secondActivationDepth = 2; secondActivationDepth < TestedDepth; secondActivationDepth
                 ++)
            {
                for (int firstActivationDepth = 1; firstActivationDepth < secondActivationDepth;
                     firstActivationDepth++)
                {
                    Db().Activate(linkedArrays, firstActivationDepth);
                    Db().Activate(linkedArrays, secondActivationDepth);
                    linkedArrays.AssertActivationDepth(secondActivationDepth, false);
                    Db().Deactivate(linkedArrays, int.MaxValue);
                }
            }
        }
Esempio n. 8
0
        public virtual void TestTransparentActivationQuery()
        {
            LinkedArrays linkedArray = QueryForRoot();

            linkedArray.AssertActivationDepth(TestedDepth - 1, true);
        }