-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Lots of (admittedly poorly managed) changes to rev to v2. * Biggest change: Now there's a TestBuilder.Build() method that will validate as many dependencies as possible. --------- Co-authored-by: Michael Curn <[email protected]> Co-authored-by: Kevin B <[email protected]>
- Loading branch information
1 parent
02d51df
commit 0ebf19d
Showing
41 changed files
with
2,392 additions
and
902 deletions.
There are no files selected for viewing
27 changes: 19 additions & 8 deletions
27
IntelliTect.TestTools.TestFramework/ExampleTests/ExampleTests/ExampleTests.csproj
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
11 changes: 11 additions & 0 deletions
11
...liTect.TestTools.TestFramework/IntelliTect.TestTools.TestFramework.Tests/ErrorMessages.cs
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,11 @@ | ||
namespace IntelliTect.TestTools.TestFramework.Tests | ||
{ | ||
public static class ErrorMessages | ||
{ | ||
public const string ExecuteError = "there must be one and only one execute method"; | ||
public const string MissingInputError = "unable to satisfy test block input"; | ||
public const string MismatchedExecuteOverrideError = "unable to find corresponding execute parameter"; | ||
public const string TooManyExecuteOverridesError = "too many execute overrides were provided"; | ||
public const string AlreadyAddedError = "multiple execute argument overrides of the same type are not allowed"; | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
...ect.TestTools.TestFramework/IntelliTect.TestTools.TestFramework.Tests/ExampleDataThing.cs
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
...tTools.TestFramework/IntelliTect.TestTools.TestFramework.Tests/ExampleDataThingFactory.cs
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
...liTect.TestTools.TestFramework/IntelliTect.TestTools.TestFramework.Tests/ExampleLogger.cs
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,42 @@ | ||
using System; | ||
|
||
namespace IntelliTect.TestTools.TestFramework.Tests | ||
{ | ||
public class ThrowingLogger : ITestCaseLogger | ||
{ | ||
public ThrowingLogger(TestCase tc) | ||
{ | ||
TestCase = tc; | ||
} | ||
|
||
public string? TestCaseKey { get; set; } | ||
public string? CurrentTestBlock { get; set; } | ||
|
||
public TestCase TestCase { get; } | ||
|
||
public void Debug(string message) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void Critical(string message) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void Info(string message) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void TestBlockInput(object input) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void TestBlockOutput(object output) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
22 changes: 16 additions & 6 deletions
22
...ntelliTect.TestTools.TestFramework.Tests/IntelliTect.TestTools.TestFramework.Tests.csproj
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
22 changes: 22 additions & 0 deletions
22
IntelliTect.TestTools.TestFramework/IntelliTect.TestTools.TestFramework.Tests/TestBase.cs
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,22 @@ | ||
using System; | ||
using Xunit; | ||
|
||
namespace IntelliTect.TestTools.TestFramework.Tests | ||
{ | ||
public class TestBase | ||
{ | ||
protected static void ValidateAggregateException(AggregateException result, int expectedInnerExceptions, params string[] messages) | ||
{ | ||
if (result is null) throw new ArgumentNullException(nameof(result)); | ||
Assert.Equal(expectedInnerExceptions, result.InnerExceptions.Count); | ||
|
||
foreach(string s in messages) | ||
{ | ||
Assert.Contains(result.InnerExceptions, | ||
m => m.Message.Contains( | ||
s, | ||
StringComparison.InvariantCultureIgnoreCase)); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.