-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormTestFixtureProperties.cs
More file actions
50 lines (49 loc) · 1.75 KB
/
Copy pathFormTestFixtureProperties.cs
File metadata and controls
50 lines (49 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace tunit {
public partial class FormTestFixtureProperties : Form {
public FormTestFixtureProperties() {
InitializeComponent();
}
public FormTestFixtureProperties(TestFixture testFixture) {
InitializeComponent();
this.Text = $"{testFixture.Name} properties";
this.labelTestFixtureName.Text = testFixture.Name;
this.labelTests.Text = testFixture.TestCount.ToString();
switch (testFixture.Status) {
case TestStatus.NotStarted:
this.pictureBoxStatus.Image = tunit.Properties.Resources.NotStartedColor;
this.labelStatus.Text = "Not Started";
break;
case TestStatus.Succeed:
this.pictureBoxStatus.Image = tunit.Properties.Resources.SucceedColor;
this.labelStatus.Text = "Succeed";
break;
case TestStatus.Ignored:
this.pictureBoxStatus.Image = tunit.Properties.Resources.IgnoredColor;
this.labelStatus.Text = "Ignored";
break;
case TestStatus.Aborted:
this.pictureBoxStatus.Image = tunit.Properties.Resources.AbortedColor;
this.labelStatus.Text = "Aborted";
break;
case TestStatus.Failed:
this.pictureBoxStatus.Image = tunit.Properties.Resources.FailedColor;
this.labelStatus.Text = "Failed";
break;
default:
break;
}
this.richTextBoxFile.Text = testFixture.UnitTest.FileName;
this.labelTime.Text = testFixture.Duration.ToString();
this.listBoxTests.Items.AddRange(testFixture.Tests);
}
}
}