src/Giles.Core/Runners/TestFrameworkResolver.cs
/// <summary>
/// Returns an instance of the first test framework runner that implements IFrameworkRunner found in the runnerAssemblyPath
/// </summary>
/// <param name="runnerAssemblyPath">Filename to load the assembly from</param>
/// <returns>An instance of the first class found that implements IFrameworkRunner</returns>
Returns an instance of the first test framework runner that implements IFrameworkRunner found in the runnerAssemblyPath
Returns an instance of the first test framework runner that implements IFrameworkRunner found in the runnerAssemblyPath
public static IFrameworkRunner GetRunnerBy(string runnerAssemblyPath)
        {
            var codeBase = new Uri(typeof(TestFrameworkResolver).Assembly.CodeBase);
            var basePath = Path.GetDirectoryName(codeBase.LocalPath);
            var assemblyLocation = Path.Combine(basePath, runnerAssemblyPath);
            var runner = GetRunnerFrom(assemblyLocation);
            if (runner == null)
                return null;
            return Activator.CreateInstance(runner) as IFrameworkRunner;
        }
public static IFrameworkRunner GetRunnerBy ( string runnerAssemblyPath ) { var codeBase = new Uri ( typeof ( TestFrameworkResolver ) . Assembly . CodeBase ) ; var basePath = Path . GetDirectoryName ( codeBase . LocalPath ) ; var assemblyLocation = Path . Combine ( basePath , runnerAssemblyPath ) ; var runner = GetRunnerFrom ( assemblyLocation ) ; if ( runner == null ) return null ; return Activator . CreateInstance ( runner ) as IFrameworkRunner ; }
Returns an instance of the first test framework runner that implements IFrameworkRunner found in the runnerAssemblyPath
Returns an instance of the first test framework runner that implements IFrameworkRunner found in the runnerAssemblyPath
An instance of the first class found that implements IFrameworkRunner
An instance of the first class found that implements IFrameworkRunner
runnerAssemblyPath
string
Filename to load the assembly from
Filename to load the assembly from