public static void Test1a(DTE2 DTE)
        {
            DTE.ItemOperations.NewFile("General\\Object-Role Modeling File", "ORMRolePlayerRequiredModel", "");

            ORMTestHooks  testHooks  = new ORMTestHooks(DTE);
            ORMTestWindow testWindow = testHooks.FindORMTestWindow(null);

            if (CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Entity Type"))
            {
                SendKeys.SendWait("{Enter}");
            }

            if (CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Entity Type"))
            {
                SendKeys.SendWait("{Enter}");
            }

            // Find the accesible object for the diagram
            AccessibleObject accDiagram = CommonTestHooks.FindAccessibleObject(
                testWindow.AccessibleObject,
                new AccessiblePathNode[] {
                new AccessiblePathNode("ORMDiagram")
            });

            // Find the accessible object for the newly added Entity Type
            AccessibleObject accEntityType = CommonTestHooks.FindAccessibleObject(
                accDiagram,
                new AccessiblePathNode[] {
                new AccessiblePathNode("EntityType", 0)
            });

            // Click on the accessible object for the newly created entity type.
            testWindow.ClickAccessibleObject(accEntityType);
        }
Esempio n. 2
0
        public void TestActivateAddToolboxItem(DTE2 DTE)
        {
            DTE.ItemOperations.NewFile("General\\Object-Role Modeling File", "ORMRolePlayerRequiredModel", "");

            ORMTestHooks  testHooks  = new ORMTestHooks(DTE);
            ORMTestWindow testWindow = testHooks.FindORMTestWindow(null);

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Entity Type");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Value Type");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Objectified Fact Type");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Binary Fact Type");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Ternary Fact Type");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "External Uniquess Constraint");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Equality Constraint");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Inclusive Or Constraint");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Exclusion Constraint");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Exclusive Or Constraint");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Subset Constraint");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Frequency Constraint");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Ring Constraint");
            SendKeys.SendWait("{Enter}");

            // Activate the type and hit enter to add to the model
            CommonTestHooks.ActivateToolboxItem(DTE, "ORM Designer", "Model Note");
            SendKeys.SendWait("{Enter}");

            // Connectors can not be added to the model
            // This includes: Model Note Connector, Subtype Connector, Role Connector, as well
            // as the Pointer.
        }