-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from nunit/issue-17
Add tests to verify that #17 is fixed; cateorize tests by expected result
- Loading branch information
Showing
12 changed files
with
116 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<appSettings> | ||
<add key="test.setting" value="54321"/> | ||
</appSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Configuration; | ||
using System.IO; | ||
using NUnit.Framework; | ||
|
||
namespace NUnitTestDemo | ||
{ | ||
[ExpectPass] | ||
public class ConfigFileTests | ||
{ | ||
[Test] | ||
public static void ProperConfigFileIsUsed() | ||
{ | ||
var expectedPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "NUnit3TestDemo.dll.config"); | ||
Assert.That(expectedPath, Is.EqualTo(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)); | ||
} | ||
|
||
[Test] | ||
public static void CanReadConfigFile() | ||
{ | ||
Assert.That(ConfigurationManager.AppSettings.Get("test.setting"), Is.EqualTo("54321")); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using NUnit.Framework; | ||
|
||
namespace NUnitTestDemo | ||
{ | ||
public class ExpectPassAttribute : PropertyAttribute | ||
{ | ||
public ExpectPassAttribute() : base("Expect", "Pass") { } | ||
} | ||
|
||
|
||
public class ExpectFailureAttribute : PropertyAttribute | ||
{ | ||
public ExpectFailureAttribute() : base("Expect", "Failure") { } | ||
} | ||
|
||
public class ExpectIgnoreAttribute : PropertyAttribute | ||
{ | ||
public ExpectIgnoreAttribute() : base("Expect", "Ignore") { } | ||
} | ||
|
||
public class ExpectErrorAttribute : PropertyAttribute | ||
{ | ||
public ExpectErrorAttribute() : base("Expect", "Error") { } | ||
} | ||
|
||
public class ExpectInconclusiveAttribute : PropertyAttribute | ||
{ | ||
public ExpectInconclusiveAttribute() : base("Expect", "Inconclusive") { } | ||
} | ||
|
||
public class ExpectMixedAttribute : PropertyAttribute | ||
{ | ||
public ExpectMixedAttribute() : base("Expect", "Mixed") { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
|
||
namespace NUnitTestDemo | ||
{ | ||
[ExpectPass] | ||
public class TextOutputTests | ||
{ | ||
[Test] | ||
|
Oops, something went wrong.