public void TestStressCtor()
        {
            long start = Environment.TickCount;

            for (int i = 1; i <= Times; ++i)
            {
                BaseLayoutEngine engine = new MockBaseLayoutEngine(StressTestsHelper.CreateConfig());

                // check results
                Assert.AreEqual(1, (int)engine.DefaultFontSize, "DefaultFontSize should be correct.");
                Assert.AreEqual(1, (int)engine.FontUnits, "FontUnits should be correct.");
                Assert.AreEqual(1, (int)engine.CharacterUnits, "CharacterUnits should be correct.");

                Assert.AreEqual(1, engine.MinimumPortWidth, "MinimumPortWidth should be correct.");
                Assert.AreEqual(1, engine.MinimumPortHeight, "MinimumPortHeight should be correct.");
                Assert.AreEqual(1, engine.MinimumLinkSpace, "MinimumLinkSpace should be correct.");
                Assert.AreEqual(1, engine.MinimumUnlinkedPortSpace, "MinimumUnlinkedPortSpace should be correct.");
                Assert.AreEqual(1, engine.MinimumNodeWidth, "MinimumNodeWidth should be correct.");
                Assert.AreEqual(1, engine.MinimumNodeHeight, "MinimumNodeHeight should be correct.");
                Assert.AreEqual(1, engine.MinimumSyntheticNodeWidth, "MinimumSyntheticNodeWidth should be correct.");
                Assert.AreEqual(1, engine.MinimumSyntheticNodeHeight, "FontUnits should be correct.");
            }

            Console.WriteLine("Total time : " + (Environment.TickCount - start) + "ms.");
        }
        public void TestStressGenerateUniqueId1()
        {
            long start = Environment.TickCount;

            for (int i = 1; i <= Times; ++i)
            {
                MockBaseLayoutEngine engine = new MockBaseLayoutEngine(StressTestsHelper.CreateConfig());

                // check results
                Assert.AreEqual(101, engine.GenerateUniqueId(typeof(MapNode), StressTestsHelper.CreateMapData()),
                                "GenerateUniqueId should be correct.");
                Assert.AreEqual(101, engine.GenerateUniqueId(typeof(MapNode), StressTestsHelper.CreateMapData()),
                                "GenerateUniqueId should be correct.");
            }

            Console.WriteLine("Total time : " + (Environment.TickCount - start) + "ms.");
        }
 public void TearDown()
 {
     StressTestsHelper.ClearConfigMgrFiles();
 }
 public void SetUp()
 {
     StressTestsHelper.LoadConfigMgrFiles();
 }