Exemple #1
0
        public void TestConstructor2()
        {
            configForCtor.RemoveAttribute("object_factory_ns");
            ble = new LayoutEngine(configForCtor);

            TestConstructor1();
        }
Exemple #2
0
        public void SetUp()
        {
            UnitTestHelper.LoadConfigManager();

            configForCtor = UnitTestHelper.GetTestConfig();
            ble           = new LayoutEngine(configForCtor);

            blept = new BaseLayoutEngineProtectedTests();

            md = UnitTestHelper.GetSampleMapData();
        }
Exemple #3
0
        public void TestMinimumUnlinkedPortSpaceFail2()
        {
            IConfiguration config = UnitTestHelper.GetTestConfig();

            config.SetSimpleAttribute("minimum_unlinked_port_space", "00");

            try
            {
                ble = new LayoutEngine(config);
            }
            catch (Exception e)
            {
                Assert.AreEqual(typeof(SelfDocumentingException), e.GetType(), "Wrong type of exception.");
                Assert.AreEqual(typeof(ConfigurationAPIException), e.InnerException.GetType(),
                                "Wrong type of inner exception.");
            }
        }
Exemple #4
0
        public void TestMinimumSyntheticNodeHeightFail2()
        {
            IConfiguration config = UnitTestHelper.GetTestConfig();

            config.SetSimpleAttribute("minimum_synthetic_node_height", "00");

            try
            {
                ble = new LayoutEngine(config);
            }
            catch (Exception e)
            {
                Assert.AreEqual(typeof(SelfDocumentingException), e.GetType(), "Wrong type of exception.");
                Assert.AreEqual(typeof(ConfigurationAPIException), e.InnerException.GetType(),
                                "Wrong type of inner exception.");
            }
        }
Exemple #5
0
        public void TestMinimumNodeWidthFail1()
        {
            IConfiguration config = UnitTestHelper.GetTestConfig();

            config.SetSimpleAttribute("minimum_node_width", "12A");

            try
            {
                ble = new LayoutEngine(config);
            }
            catch (Exception e)
            {
                Assert.AreEqual(typeof(SelfDocumentingException), e.GetType(), "Wrong type of exception.");
                Assert.AreEqual(typeof(ConfigurationAPIException), e.InnerException.GetType(),
                                "Wrong type of inner exception.");
            }
        }
Exemple #6
0
        public void TestCharacterUnitsFail2()
        {
            IConfiguration config = UnitTestHelper.GetTestConfig();

            config.SetSimpleAttribute("character_units", "0.0");

            try
            {
                ble = new LayoutEngine(config);
            }
            catch (Exception e)
            {
                Assert.AreEqual(typeof(SelfDocumentingException), e.GetType(), "Wrong type of exception.");
                Assert.AreEqual(typeof(ConfigurationAPIException), e.InnerException.GetType(),
                                "Wrong type of inner exception.");
            }
        }
Exemple #7
0
        public void TestDefaultFontSizeFail1()
        {
            IConfiguration config = UnitTestHelper.GetTestConfig();

            config.SetSimpleAttribute("default_font_size", "9.o02");

            try
            {
                ble = new LayoutEngine(config);
            }
            catch (Exception e)
            {
                Assert.AreEqual(typeof(SelfDocumentingException), e.GetType(), "Wrong type of exception.");
                Assert.AreEqual(typeof(ConfigurationAPIException), e.InnerException.GetType(),
                                "Wrong type of inner exception.");
            }
        }