Exemplo n.º 1
0
        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.");
        }
Exemplo n.º 2
0
        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.");
        }
Exemplo n.º 3
0
 public void TearDown()
 {
     StressTestsHelper.ClearConfigMgrFiles();
 }
Exemplo n.º 4
0
 public void SetUp()
 {
     StressTestsHelper.LoadConfigMgrFiles();
 }