public void GetPluginRegistrationObject_Makes_Expected_Calls() { var pluginRegistrationHelper = new PluginRegistrationHelper(LogVerbose, LogWarning, _fakeLoader, _fakeObjectFactory); pluginRegistrationHelper.GetPluginRegistrationObject("assemblyPath", "customAttributeClass"); A.CallTo(() => _fakeLoader.Initialise("assemblyPath", "customAttributeClass")).MustHaveHappened(); A.CallTo(() => _fakeObjectFactory.GetAssembly(_fakeLoader)).MustHaveHappened(); }
public void SetUp() { _fakeLoader = A.Fake <IReflectionLoader>(); _fakeObjectFactory = A.Fake <IPluginRegistrationObjectFactory>(); A.CallTo(() => _fakeLoader.Initialise(A <string> ._, A <string> ._)); A.CallTo(() => _fakeObjectFactory.GetAssembly(A <IReflectionLoader> ._)).Returns(new Assembly()); }
public object GetPluginRegistrationObject(string assemblyPath, string customAttributeClass) { reflectionLoader.Initialise(assemblyPath, customAttributeClass); return(pluginRegistrationObjectFactory.GetAssembly(reflectionLoader)); }