File tree Expand file tree Collapse file tree
nunit.engine.core/Drivers
nunit.engine.tests/Drivers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace NUnit.Engine.Drivers
99{
1010 public class NUnit3DriverFactory : IDriverFactory
1111 {
12- private const string NUNIT_FRAMEWORK = "nunit.framework" ;
12+ public const string NUNIT_FRAMEWORK = "nunit.framework" ;
1313
1414 /// <summary>
1515 /// Gets a flag indicating whether a given assembly name and version
Original file line number Diff line number Diff line change 1+ using NUnit . Engine . Drivers ;
2+ using NUnit . Framework ;
3+ using System ;
4+ using System . Reflection ;
5+
6+ namespace NUnit . Engine . Tests . Drivers
7+ {
8+ public class NUnit3DriverFactoryTests
9+ {
10+ private NUnit3DriverFactory _factory ;
11+
12+ [ SetUp ]
13+ public void SetUp ( )
14+ {
15+ _factory = new NUnit3DriverFactory ( ) ;
16+ }
17+
18+ [ TestCase ( 2 , ExpectedResult = false ) ]
19+ [ TestCase ( 3 , ExpectedResult = true ) ]
20+ [ TestCase ( 4 , ExpectedResult = true ) ]
21+ public bool SupportsNetFramework ( int majorVersion )
22+ {
23+ AssemblyName name = new AssemblyName ( NUnit3DriverFactory . NUNIT_FRAMEWORK )
24+ {
25+ Version = new Version ( majorVersion , 0 )
26+ } ;
27+
28+ return _factory . IsSupportedTestFramework ( name ) ;
29+ }
30+
31+ [ Test ]
32+ public void DoesNotSupportOtherFrameworks ( )
33+ {
34+ AssemblyName name = new AssemblyName ( "VSTest.dll" )
35+ {
36+ Version = new Version ( 3 , 0 )
37+ } ;
38+
39+ Assert . That ( _factory . IsSupportedTestFramework ( name ) , Is . False ) ;
40+ }
41+ }
42+ }
You can’t perform that action at this time.
0 commit comments