public void SetUp() { _autoSubstitute = AutoSubstituteContainer.Create(); _controller = _autoSubstitute.GetController <DmpController>(); _projectRepository = _autoSubstitute.Resolve <IProjectRepository>(); _timerRepository = _autoSubstitute.Resolve <ITimerRepository>(); _context = _autoSubstitute.Resolve <ControllerContext>(); _form = _context.HttpContext.Request.Form; _lookup = _autoSubstitute.Resolve <ICurtinUserService>(); }
public void SetUp() { _autoSubstitute = AutoSubstituteContainer.Create(); _controller = _autoSubstitute.GetController <ProjectController>(); _dmpController = _autoSubstitute.GetController <DmpController>(); _projectRepository = _autoSubstitute.Resolve <IProjectRepository>(); _context = _autoSubstitute.Resolve <ControllerContext>(); _form = _context.HttpContext.Request.Form; _lookup = _autoSubstitute.Resolve <ICurtinUserService>(); _fieldOfResearchRepository = _autoSubstitute.Resolve <IFieldOfResearchRepository>(); _socioEconomicObjectiveRepository = _autoSubstitute.Resolve <ISocioEconomicObjectiveRepository>(); var appSettings = _autoSubstitute.Resolve <IAppSettingsService>(); var dependencyResolver = _autoSubstitute.Resolve <IDependencyResolver>(); DependencyResolver.SetResolver(dependencyResolver); dependencyResolver.GetService <IAppSettingsService>().Returns(appSettings); }