public void Init() { authManager = Substitute.For <IAuthenticationManager>(); projectConfigurationManager = Substitute.For <IProjectConfigurationManager>(); dialogFactory = Substitute.For <IDialogFactory>(); projectManager = Substitute.For <IProjectManager>(); codeProviderFactory = Substitute.For <ICodeProviderFactory>(); authenticationCommandBaseTest = new AuthenticationCommandBaseTest(authManager, dialogFactory, projectManager, projectConfigurationManager, codeProviderFactory); var projectConfiguraiton = Substitute.For <IProjectConfiguraiton>(); projectConfigurationManager.Load(projectManager.ProjectConfigPath).Returns(projectConfiguraiton); projectConfiguraiton.Connections.Returns(Substitute.For <List <ConnectionInfo> >()); }
public void Init() { authManager = Substitute.For <IAuthenticationManager>(); projectConfigurationManager = Substitute.For <IProjectConfigurationManager>(); dialogFactory = Substitute.For <IDialogFactory>(); projectManager = Substitute.For <IProjectManager>(); codeProviderFactory = Substitute.For <ICodeProviderFactory>(); messageManager = Substitute.For <MessageManager>(); authenticationCommandBaseTest = new AuthenticationCommandBaseTest(authManager, dialogFactory, projectManager, projectConfigurationManager, codeProviderFactory, messageManager); IProjectConfiguraiton projectConfiguraiton = Substitute.For <IProjectConfiguraiton>(); projectConfiguraiton.Connections.Returns(Substitute.For <List <ConnectionInfo> >()); projectConfiguraiton.MethodInfos.Returns(Substitute.For <List <MethodInfo> >()); projectConfigurationManager.When(x => x.Load(projectManager.ProjectConfigPath)) .Do(callback => { projectConfigurationManager.CurrentProjectConfiguraiton.Returns(projectConfiguraiton); }); }