33// Licensed under the MIT License. See LICENSE file in root directory.
44// ***********************************************************************
55
6- using TestCentric . Extensibility ;
7- using TestCentric . Engine . Services ;
8-
96using System . Diagnostics ;
107using System ;
118using System . Reflection ;
129using System . Xml ;
1310using System . IO ;
1411
15- #if false
1612namespace TestCentric . Engine . Extensibility
1713{
18- // Extensions
19-
20- [ Extension ( Enabled = false , Path = "/TestCentric/Engine/TypeExtensions/ITestEventListener" ) ]
21- public class FakeTestEventListener : ITestEventListener
22- {
23- public void OnTestEvent ( string text )
24- {
25- throw new System . NotImplementedException ( ) ;
26- }
27- }
14+ using TestCentric . Extensibility ;
2815
29- // [Extension]
30- public class FakeService : IService
16+ [ Extension ]
17+ public class FakeAgentLauncher : IAgentLauncher
3118 {
32- public IServiceLocator ServiceContext { get => throw new System . NotImplementedException ( ) ; set => throw new System . NotImplementedException ( ) ; }
33-
34- public ServiceStatus Status => throw new System . NotImplementedException ( ) ;
19+ public TestAgentInfo AgentInfo => throw new NotImplementedException ( ) ;
3520
36- public void StartService ( )
21+ public bool CanCreateProcess ( TestPackage package )
3722 {
38- throw new System . NotImplementedException ( ) ;
23+ throw new NotImplementedException ( ) ;
3924 }
4025
41- public void StopService ( )
26+ public Process CreateProcess ( Guid agentId , string agencyUrl , TestPackage package )
4227 {
43- throw new System . NotImplementedException ( ) ;
28+ throw new NotImplementedException ( ) ;
4429 }
4530 }
4631
47- [ Extension ]
48- public class FakeAgentLauncher : TestCentric . Engine . Extensibility . IAgentLauncher
32+ [ Extension ( Enabled = false ) ]
33+ public class FakeAgentLauncher_ThrowsInConstructor : IAgentLauncher
4934 {
35+ public FakeAgentLauncher_ThrowsInConstructor ( )
36+ {
37+ throw new NotImplementedException ( ) ;
38+ }
39+
5040 public TestAgentInfo AgentInfo => throw new NotImplementedException ( ) ;
5141
5242 public bool CanCreateProcess ( TestPackage package )
@@ -59,26 +49,58 @@ public Process CreateProcess(Guid agentId, string agencyUrl, TestPackage package
5949 throw new NotImplementedException ( ) ;
6050 }
6151 }
52+ }
6253
63- //[Extension]
64- public class FakeDriverFactory : IDriverFactory
65- {
66- #if NETFRAMEWORK
67- public IFrameworkDriver GetDriver ( AppDomain domain , AssemblyName reference )
54+ namespace NUnit . Engine . Extensibility
55+ {
56+ #if NET20
57+ using NUnit . Engine . Extensibility ;
6858#else
69- public IFrameworkDriver GetDriver ( AssemblyName reference )
59+ using NUnit . Extensibility ;
7060#endif
61+
62+ [ Extension ( Enabled = false , Path = "/NUnit/Engine/TypeExtensions/ITestEventListener" ) ]
63+ public class FakeTestEventListener : ITestEventListener
64+ {
65+ public void OnTestEvent ( string text )
7166 {
72- throw new NotImplementedException ( ) ;
67+ throw new System . NotImplementedException ( ) ;
7368 }
69+ }
7470
75- public bool IsSupportedTestFramework ( AssemblyName reference )
71+ [ Extension ( Path = "/NUnit/Engine/TypeExtensions/IProjectLoader" ) ]
72+ public class FakeProjectLoader : IProjectLoader
73+ {
74+ public bool CanLoadFrom ( string path )
7675 {
77- throw new NotImplementedException ( ) ;
76+ throw new System . NotImplementedException ( ) ;
77+ }
78+
79+ public NUnit . Engine . Extensibility . IProject LoadFrom ( string path )
80+ {
81+ throw new System . NotImplementedException ( ) ;
7882 }
7983 }
8084
81- //[Extension]
85+ // [Extension]
86+ // public class FakeDriverFactory : IDriverFactory
87+ // {
88+ //#if NETFRAMEWORK
89+ // public IFrameworkDriver GetDriver(AppDomain domain, AssemblyName reference)
90+ //#else
91+ // public IFrameworkDriver GetDriver(AssemblyName reference)
92+ //#endif
93+ // {
94+ // throw new NotImplementedException();
95+ // }
96+
97+ // public bool IsSupportedTestFramework(AssemblyName reference)
98+ // {
99+ // throw new NotImplementedException();
100+ // }
101+ // }
102+
103+ [ Extension ]
82104 public class FakeResultWriter : IResultWriter
83105 {
84106 public void CheckWritability ( string outputPath )
@@ -97,10 +119,10 @@ public void WriteResultFile(XmlNode resultNode, TextWriter writer)
97119 }
98120 }
99121
100- [ Extension ( Enabled = false ) ]
101- public class FakeExtension_ThrowsInConstructor : ITestEventListener
122+ [ Extension ( Enabled = false , Path = "/NUnit/Engine/TypeExtensions/ITestEventListener" ) ]
123+ public class FakeNUnitExtension_ThrowsInConstructor : ITestEventListener
102124 {
103- public FakeExtension_ThrowsInConstructor ( )
125+ public FakeNUnitExtension_ThrowsInConstructor ( )
104126 {
105127 throw new NotImplementedException ( ) ;
106128 }
@@ -111,22 +133,3 @@ public void OnTestEvent(string text)
111133 }
112134 }
113135}
114- #endif
115-
116- namespace NUnit . Engine . Extensibility
117- {
118- //[Extension(Path = "/NUnit/Engine/TypeExtensions/IProjectLoader/")]
119- [ Extension ]
120- public class FakeProjectLoader : IProjectLoader
121- {
122- public bool CanLoadFrom ( string path )
123- {
124- throw new System . NotImplementedException ( ) ;
125- }
126-
127- public NUnit . Engine . Extensibility . IProject LoadFrom ( string path )
128- {
129- throw new System . NotImplementedException ( ) ;
130- }
131- }
132- }
0 commit comments