/// <summary> /// Initializes a new instance of the routing configuration class. /// </summary> /// <returns>A new instance of the routing configuration class.</returns> public static IAssemblyResolver Create(MockAssembly assembly = null) { IAssemblyResolver resolver = null; if (assembly != null) { resolver = new TestAssemblyResolver(assembly); } else { Mock <IAssemblyResolver> mockAssembliesResolver = new Mock <IAssemblyResolver>(); mockAssembliesResolver .Setup(r => r.Assemblies) .Returns(new Assembly[0]); resolver = mockAssembliesResolver.Object; } return(resolver); }
public TestAssemblyResolver(MockAssembly assembly) { _assemblies = new List <Assembly>(); _assemblies.Add(assembly); }