diff options
Diffstat (limited to 'src/test/burn/WixTestTools/RuntimeFactAttribute.cs')
-rw-r--r-- | src/test/burn/WixTestTools/RuntimeFactAttribute.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs index 76004f26..d7f56f70 100644 --- a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs +++ b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs | |||
@@ -10,6 +10,8 @@ namespace WixTestTools | |||
10 | 10 | ||
11 | public class RuntimeFactAttribute : SkippableFactAttribute | 11 | public class RuntimeFactAttribute : SkippableFactAttribute |
12 | { | 12 | { |
13 | private bool domainRequired; | ||
14 | |||
13 | const string RequiredEnvironmentVariableName = "RuntimeTestsEnabled"; | 15 | const string RequiredEnvironmentVariableName = "RuntimeTestsEnabled"; |
14 | const string RequiredDomainEnvironmentVariableName = "RuntimeDomainTestsEnabled"; | 16 | const string RequiredDomainEnvironmentVariableName = "RuntimeDomainTestsEnabled"; |
15 | 17 | ||
@@ -47,17 +49,16 @@ namespace WixTestTools | |||
47 | RuntimeDomainTestsEnabled = Boolean.TryParse(domainTestsEnabledString, out var domainTestsEnabled) && domainTestsEnabled; | 49 | RuntimeDomainTestsEnabled = Boolean.TryParse(domainTestsEnabledString, out var domainTestsEnabled) && domainTestsEnabled; |
48 | } | 50 | } |
49 | 51 | ||
50 | private bool _domainRequired; | ||
51 | public bool DomainRequired | 52 | public bool DomainRequired |
52 | { | 53 | { |
53 | get | 54 | get |
54 | { | 55 | { |
55 | return _domainRequired; | 56 | return this.domainRequired; |
56 | } | 57 | } |
57 | set | 58 | set |
58 | { | 59 | { |
59 | _domainRequired = value; | 60 | this.domainRequired = value; |
60 | if (_domainRequired && String.IsNullOrEmpty(this.Skip) && (!RunningInDomain || !RuntimeDomainTestsEnabled)) | 61 | if (this.domainRequired && String.IsNullOrEmpty(this.Skip) && (!RunningInDomain || !RuntimeDomainTestsEnabled)) |
61 | { | 62 | { |
62 | this.Skip = $"These tests require the test host to be running as a domain member ({(RunningInDomain ? "passed" : "failed")}). These tests affect both MACHINE AND DOMAIN state. To accept the consequences, set the {RequiredDomainEnvironmentVariableName} environment variable to true ({(RuntimeDomainTestsEnabled ? "passed" : "failed")})."; | 63 | this.Skip = $"These tests require the test host to be running as a domain member ({(RunningInDomain ? "passed" : "failed")}). These tests affect both MACHINE AND DOMAIN state. To accept the consequences, set the {RequiredDomainEnvironmentVariableName} environment variable to true ({(RuntimeDomainTestsEnabled ? "passed" : "failed")})."; |
63 | } | 64 | } |