-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormTestProperties.cs
More file actions
51 lines (50 loc) · 1.76 KB
/
Copy pathFormTestProperties.cs
File metadata and controls
51 lines (50 loc) · 1.76 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
51
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 FormTestProperties : Form {
public FormTestProperties() {
InitializeComponent();
}
public FormTestProperties(Test test) {
InitializeComponent();
this.Text = $"{test.TestFixture.Name}::{test.Name} properties";
this.labelTestName.Text = test.Name;
this.labelTestFixtureName.Text = test.TestFixture.Name;
switch (test.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 = test.TestFixture.UnitTest.FileName;
this.richTextBoxMessage.Lines = test.Messages;
this.richTextBoxStackTrace.Text = test.StackTrace;
this.labelTime.Text = test.Duration.ToString();
}
}
}