Example #1
0
        public void TestFinalDisplay()
        {
            Assert.AreEqual(false, statusBar.DisplayTestProgress);
            statusBar.Initialize(mockEvents);

            mockEvents.SimulateTestRun();
            Assert.AreEqual("Completed", statusBar.Panels[0].Text);
            Assert.AreEqual(
                PanelMessage("Test Cases", MockAssembly.Tests),
                statusBar.Panels[1].Text);
            Assert.AreEqual(
                PanelMessage("Tests Run", MockAssembly.Tests - MockAssembly.NotRun),
                statusBar.Panels[2].Text);
            Assert.AreEqual("Failures : 0", statusBar.Panels[3].Text);
            Assert.AreEqual("Time : 0", statusBar.Panels[4].Text);
        }
        public void TestFinalDisplay()
        {
            Assert.AreEqual(false, statusBar.DisplayTestProgress);
            statusBar.Subscribe(mockEvents);

            mockEvents.SimulateTestRun();
            Assert.AreEqual("Completed", statusBar.Panels[0].Text);
            Assert.AreEqual(
                PanelMessage("Test Cases", MockAssembly.Tests),
                statusBar.Panels[1].Text);
            Assert.AreEqual(
                PanelMessage("Tests Run", MockAssembly.TestsRun),
                statusBar.Panels[2].Text);
            Assert.AreEqual(
                PanelMessage("Errors", MockAssembly.Errors),
                statusBar.Panels[3].Text);
            Assert.AreEqual(
                PanelMessage("Failures", MockAssembly.Failures),
                statusBar.Panels[4].Text);
        }
Example #3
0
        public void TestProgressDisplay()
        {
            progressBar.Subscribe(mockEvents);
            mockEvents.TestFinished += new TestEventHandler(OnTestFinished);

            testCount = 0;
            mockEvents.SimulateTestRun();

            Assert.AreEqual(0, progressBar.Minimum);
            Assert.AreEqual(MockAssembly.Tests, progressBar.Maximum);
            Assert.AreEqual(1, progressBar.Step);
            Assert.AreEqual(MockAssembly.ResultCount, progressBar.Value);
            Assert.AreEqual(Color.Red, progressBar.ForeColor);
        }