Exemplo n.º 1
0
        public void testLoadOfPythonRuleItem()
        {
            ruleItem_script testItem = new ruleItem_script(Properties.Settings.Default.testDataPath + filename);

            Assert.AreEqual("test python rule item", testItem.ruleName());

            Dictionary<String, pin> pins = testItem.getPinInfo();

            Assert.IsTrue(testItem.getCategory() == "");

            Assert.IsTrue(pins.Count == 2 );
            Assert.IsTrue(pins.ContainsKey("myInputPin"));
            Assert.IsTrue(pins.ContainsKey("myOutputPin"));

            Assert.IsTrue(pins["myOutputPin"].direction == pinDirection.output);
            Assert.IsTrue(pins["myInputPin"].direction == pinDirection.input);
        }
Exemplo n.º 2
0
        public void testLoadOfPythonRuleItemWithCategory()
        {
            ruleItem_script testItem = new ruleItem_script(Properties.Settings.Default.testDataPath + filenameCategory);

            Assert.AreEqual("test python rule item", testItem.ruleName());
            Assert.AreEqual("test category", testItem.getCategory());
        }