-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These are excluded from tests at the moment as the framework cannot handle them.
- Loading branch information
Showing
5 changed files
with
70 additions
and
4 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
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
52 changes: 52 additions & 0 deletions
52
src/Tests/AutoTest.ExampleLibrary/Issues/Issue001/ComplexGenericMethods.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,52 @@ | ||
namespace AutoTest.ExampleLibrary.Issues.Issue001 | ||
{ | ||
using System; | ||
|
||
public static class ComplexGenericMethods | ||
{ | ||
/// <summary> | ||
/// Gets a value indicating if the <see cref="NonGenericMethod"/> value parameter has been tested. | ||
/// </summary> | ||
public static bool NonGenericTested { get; private set; } | ||
|
||
public interface ITest1 | ||
{ | ||
string String1 { get; set; } | ||
} | ||
|
||
public interface ITest2 | ||
{ | ||
string String2 { get; set; } | ||
} | ||
|
||
public static void NonGenericMethod(string value) | ||
{ | ||
NonGenericTested = false; | ||
if (value == null) | ||
{ | ||
NonGenericTested = true; | ||
throw new ArgumentNullException("value"); | ||
} | ||
|
||
throw new Exception("Shouldn't ever get here."); | ||
} | ||
|
||
public static void GenericClassMethod<TClass>(TClass classValue, string stringValue) | ||
where TClass : class, ITest1, ITest2 | ||
{ | ||
throw new Exception("Shouldn't ever get here."); | ||
} | ||
|
||
public static void GenericExceptionMethod<TException>(TException classValue, string stringValue) | ||
where TException : Exception, ITest1, ITest2 | ||
{ | ||
throw new Exception("Shouldn't ever get here."); | ||
} | ||
|
||
public static void GenericStructMethod<TStruct>(TStruct classValue, string stringValue) | ||
where TStruct : struct, ITest1, ITest2 | ||
{ | ||
throw new Exception("Shouldn't ever get here."); | ||
} | ||
} | ||
} |
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