Esempio n. 1
0
        private void makeSampleData()
        {
            XsMgr.XRoot           = ExStoreRoot.Instance();
            XsMgr.XRoot.IsDefault = false;

            // make data and flag as not default
            xsTest.makeSampleDataAppAndCell();
        }
Esempio n. 2
0
        private ExStoreRtnCodes makeRoot()
        {
            ExStoreRtnCodes result;

            XsMgr.XRoot = ExStoreRoot.Instance();

            result = XsMgr.WriteRoot();
            if (result != ExStoreRtnCodes.XRC_GOOD)
            {
                return(result);
            }

            return(ExStoreRtnCodes.XRC_GOOD);
        }
Esempio n. 3
0
        private ExStoreRtnCodes test01_3()
        {
            ExStoreRtnCodes result = ExStoreRtnCodes.XRC_GOOD;

            ExStoreRoot xRoot = ExStoreRoot.Instance();

            stat("Status| ", result);

            result = makeRoot();
            if (result != ExStoreRtnCodes.XRC_GOOD)
            {
                return(result);
            }

            return(ExStoreRtnCodes.XRC_GOOD);
        }
Esempio n. 4
0
        private Result Test01()
        {
            if (AppRibbon.Doc.IsDetached)
            {
                return(Result.Cancelled);
            }

            ExStoreRoot     xRoot = ExStoreRoot.Instance();
            ExStoreRtnCodes result;

            // result = XsMgr.Initialize();
            // if (result != ExStoreRtnCodes.GOOD) return Result.Failed;
            //
            // result = XsMgr.Configure();
            // if (result != ExStoreRtnCodes.GOOD) return Result.Failed;

            result = ExStorageTests.MakeRootExStorage();
            if (result != ExStoreRtnCodes.XRC_GOOD)
            {
                return(Result.Failed);
            }

            return(Result.Succeeded);
        }
Esempio n. 5
0
        private ExStoreRtnCodes test01_4()
        {
            ExStoreRtnCodes result = ExStoreRtnCodes.XRC_GOOD;

            switch (step)
            {
            case 0:
            {
                // step 0 - just the initial status
                stat("Initial status", result);

                // temp to show the schema structure
                if (false)
                {
                    makeSampleDataAppAndCell();
                    XsMgr.xxx();
                }

                break;
            }

            case 1:
            {
                // step one - make the root data store
                XsMgr.XRoot = ExStoreRoot.Instance();
                result      = XsMgr.CreateRoot();

                stat("step 1| create root", result);
                break;
            }

            case 2:
            {
                // step two - make the app & cell data store
                makeSampleDataAppAndCell();
                result = XsMgr.CreateAppDs();

                stat("Step 2| create app", result);
                break;
            }

            case 3:
            {
                result = ExStoreRtnCodes.XRC_FAIL;
                stat("Step 3", result);
                break;
            }

            case 4:
            {
                result = ExStoreRtnCodes.XRC_FAIL;
                stat("Step 4", result);
                break;
            }

            case 5:
            {
                result = ExStoreRtnCodes.XRC_FAIL;
                stat("Step 5", result);
                step = 0;
                break;
            }
            }

            if (result != ExStoreRtnCodes.XRC_GOOD)
            {
                step -= 1;
            }

            step++;

            return(result);
        }