public void SetUp() { ServiceLocatorInitializer.Init(); _timeEntryAuditRepository = MockRepository.GenerateMock <ITimeEntryAuditRepository>(); _timeEntryAuditRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _timeEntryRepository = MockRepository.GenerateMock <ITimeEntryRepository>(); _timeEntryAuditRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _wrmsSystemRepository = MockRepository.GenerateMock <IWrmsSystemRepository>(); _wrmsSystemRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _requestRepository = MockRepository.GenerateMock <IRequestRepository>(); _requestRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _personManagementService = MockRepository.GenerateMock <IPersonManagementService>(); _timeEntryAuditManagementService = new TimeEntryAuditManagementService(_timeEntryAuditRepository, _personManagementService, _timeEntryRepository); }
public App() { InitializeComponent(); ServiceLocatorInitializer.Initialize(); _activationService = new Lazy <ActivationService>(CreateActivationService); }
protected override void OnStart(string[] args) { storage = new WcfSessionStorage(); log4net.Config.XmlConfigurator.Configure(); // Create container IWindsorContainer container = new WindsorContainer(); // Add Engine for the Host Service container.AddComponent("outfitEngineService", typeof(OutfitEngineService)); container.AddComponent("outfitUpdaterService", typeof(OutfitUpdaterService)); // Add the Services to the Container ComponentRegistrar.AddServicesTo(container); ComponentRegistrar.AddApplicationServicesTo(container); // Create the container ServiceLocatorInitializer.Init(container); // Initialize NHibernate NHibernateInitializer.Instance().InitializeNHibernateOnce( () => InitializeNHibernateSession()); // Create Service Host host = new System.ServiceModel.ServiceHost(typeof(OutfitEngineService)); host.Description.Behaviors.Add(new PerCallServiceBehavior()); host.Open(); hostUpdater = new SharpArch.Wcf.NHibernate.ServiceHost(typeof(OutfitUpdaterService)); hostUpdater.Open(); }
public void SetUp() { ServiceLocatorInitializer.Init(); _requestRepository = MockRepository.GenerateMock <IRequestRepository>(); _requestRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _orgManagementService = MockRepository.GenerateMock <IOrgManagementService>(); _personManagementService = MockRepository.GenerateMock <IPersonManagementService>(); _requestTypeManagementService = MockRepository.GenerateMock <IRequestTypeManagementService>(); _requestStatusManagementService = MockRepository.GenerateMock <IRequestStatusManagementService>(); _wrmsSystemManagementService = MockRepository.GenerateMock <IWrmsSystemManagementService>(); _agencyManagementService = MockRepository.GenerateMock <IAgencyManagementService>(); _timeEntryManagementService = MockRepository.GenerateMock <ITimeEntryManagementService>(); _requestEstimateManagementService = MockRepository.GenerateMock <IRequestEstimateManagementService>(); _requestManagementService = new RequestManagementService(_requestRepository, _orgManagementService, _personManagementService, _requestTypeManagementService, _requestStatusManagementService, _wrmsSystemManagementService, _agencyManagementService, _requestEstimateManagementService, _timeEntryManagementService); }
public void SetUp() { ServiceLocatorInitializer.Init(); controller = new TipsController( CreateMockTipRepository(), TasksControllerTests.CreateMockTaskRepository(), MockRepository.GenerateMock <IUserRepository>()); }
public void SetUp() { ServiceLocatorInitializer.Init(); slideManagementService = MockRepository.GenerateMock <ISlideManagementService>(); slidesController = new SlidesController(slideManagementService); }
public void SetUp() { ServiceLocatorInitializer.Init(); controller = new BonusTasksController(CreateMockBonusTaskRepository(), MockRepository.GenerateMock <IUserRepository>()); controller.ControllerContext = new MvcFakes.FakeControllerContext(controller, new User { Login = "******", Game = new Game() }); }
public void SetUp() { ServiceLocatorInitializer.Init(); publisherManagementService = MockRepository.GenerateMock <IPublisherManagementService>(); publishersController = new PublishersController(publisherManagementService); }
public void SetUp() { ServiceLocatorInitializer.Init(); channelManagementService = MockRepository.GenerateMock <IChannelManagementService>(); channelsController = new ChannelsController(channelManagementService); }
public void SetUp() { ServiceLocatorInitializer.Init(); templateManagementService = MockRepository.GenerateMock <ITemplateManagementService>(); templatesController = new TemplatesController(templateManagementService); }
public void SetUp() { ServiceLocatorInitializer.Init(); rSSFeedManagementService = MockRepository.GenerateMock <IRSSFeedManagementService>(); rSSFeedsController = new RSSFeedsController(rSSFeedManagementService); }
public void SetUp() { ServiceLocatorInitializer.Init(); assetContentManagementService = MockRepository.GenerateMock <IAssetContentManagementService>(); assetContentsController = new AssetContentsController(assetContentManagementService); }
public virtual void SetUp() { ServiceLocatorInitializer.Init(); string[] mappingAssemblies = RepositoryTestsHelper.GetMappingAssemblies(); _configuration = NHibernateSession.Init(new SimpleSessionStorage(), mappingAssemblies, "../../../../app/wrms.Web/NHibernate.config"); _timeEntryAuditRepository = new TimeEntryAuditRepository(); }
public void SetUp() { ServiceLocatorInitializer.Init(); controller = new AdminUsersController( CreateMockUserRepository(), MockRepository.GenerateMock<IMembershipService>(), MockRepository.GenerateMock<IRepository<Team>>(), MockRepository.GenerateMock<IRepository<Game>>()); }
public void SetUp() { ServiceLocatorInitializer.Init(); templateRepository = MockRepository.GenerateMock <ITemplateRepository>(); templateRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); templateManagementService = new TemplateManagementService(templateRepository); }
public virtual void SetUp() { ServiceLocatorInitializer.Init(); string[] mappingAssemblies = RepositoryTestsHelper.GetMappingAssemblies(); _configuration = NHibernateSession.Init(new SimpleSessionStorage(), mappingAssemblies, "../../../../app/wrms.Web/NHibernate.config"); _HostRepository = new HostRepository(); //_requestRepository = new RequestRepository(); //_wrmsSystemRepository = new WrmsSystemRepository(); }
public void SetUp() { ServiceLocatorInitializer.Init(); _agencyRepository = MockRepository.GenerateMock <IAgencyRepository>(); _agencyRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _agencyManagementService = new AgencyManagementService(_agencyRepository); }
public void SetUp() { ServiceLocatorInitializer.Init(); slideFolderRepository = MockRepository.GenerateMock <ISlideFolderRepository>(); slideFolderRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); slideFolderManagementService = new SlideFolderManagementService(slideFolderRepository); }
public void CannotHaveValidCustomerWithoutCompanyName() { // Register the IValidator service ServiceLocatorInitializer.Init(); Customer customer = new Customer(); customer.IsValid().ShouldBeFalse(); customer.CompanyName = "Acme"; customer.IsValid().ShouldBeTrue(); }
public void SetUp() { ServiceLocatorInitializer.Init(); channelsSlideRepository = MockRepository.GenerateMock <IChannelsSlideRepository>(); channelsSlideRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); channelsSlideManagementService = new ChannelsSlideManagementService(channelsSlideRepository); }
public void SetUp() { ServiceLocatorInitializer.Init(); _requestTypeRepository = MockRepository.GenerateMock <IRequestTypeRepository>(); _requestTypeRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _requestTypeManagementService = new RequestTypeManagementService(_requestTypeRepository); }
public void SetUp() { ServiceLocatorInitializer.Init(); rSSFeedRepository = MockRepository.GenerateMock <IRSSFeedRepository>(); rSSFeedRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); rSSFeedManagementService = new RSSFeedManagementService(rSSFeedRepository, null, null, null); }
public void SetUp() { ServiceLocatorInitializer.Init(); _personManagementService = MockRepository.GenerateMock <IPersonManagementService>(); _personSearchManagementService = MockRepository.GenerateMock <IPersonSearchManagementService>(); _authenticationProvider = MockRepository.GenerateMock <IAuthenticationProvider>(); _peopleController = new PeopleController(_personManagementService, _personSearchManagementService, _authenticationProvider); }
public void SetUp() { ServiceLocatorInitializer.Init(); controller = new TeamsController( CreateMockTeamRepository(), MockRepository.GenerateMock <IUserRepository>(), GamesControllerTests.CreateMockGameRepository()); testContext = new ControllerTestContext(controller); user = new User { Team = new Team() }; }
public virtual void SetUp() { string[] mappingAssemblies = RepositoryTestsHelper.GetMappingAssemblies(); var autoPersistenceModel = RepositoryTestsHelper.GetAutoPersistenceModel(mappingAssemblies); //this.configuration = NHibernateSession.Init( // new SimpleSessionStorage(), // mappingAssemblies, // new AutoPersistenceModelGenerator().Generate(), // "../../../../Solutions/QMP.Web/NHibernate.config"); ServiceLocatorInitializer.Init(); // RepositoryTestsHelper.InitializeNHibernateSession(); NHibernateSession.Init(new SimpleSessionStorage(), mappingAssemblies, autoPersistenceModel, "../../../../Solutions/QMP.Web/NHibernate.config"); }
public void SetUp() { ServiceLocatorInitializer.Init(); _wrmsSystemRepository = MockRepository.GenerateMock <IWrmsSystemRepository>(); _wrmsSystemRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _personManagementService = MockRepository.GenerateMock <IPersonManagementService>(); _wrmsSystemManagementService = new WrmsSystemManagementService(_wrmsSystemRepository, _personManagementService); }
public void SetUp() { ServiceLocatorInitializer.Init(); supportTeamRepository = MockRepository.GenerateMock <ISupportTeamRepository>(); supportTeamRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock <IDbContext>()); _personManagementService = MockRepository.GenerateMock <IPersonManagementService>(); supportTeamManagementService = new SupportTeamManagementService(supportTeamRepository, _personManagementService); }
private void Configure() { ApplicationLogic.Utils.Logger.Instance.OnInfoLogged += info => Logs.Insert(0, info); ApplicationLogic.Utils.Logger.Instance.OnErrorLogged += info => Logs.Insert(0, info); ApplicationLogic.Utils.Logger.Instance.OnSiteChangeNotificationLogged += (notification, site, message, diff) => { Action del = () => OnSiteChangeNotificationLogged(site.Id, site.SiteUrl, site.SiteName, diff); notificationsToProcess.Push(del); //_notifyIcon.Dispatcher.BeginInvoke(del); //OnSiteChangeNotificationLogged(site.SiteUrl, message); }; log4net.Config.XmlConfigurator.Configure(); if (!File.Exists(AppDomain.CurrentDomain.BaseDirectory + "\\appdb.db")) { File.Create(AppDomain.CurrentDomain.BaseDirectory + "\\appdb.db"); } ServiceLocatorInitializer.Init(); Initializer.Init(); Jobs = new List <BaseJob>() { new CheckSitesJob(false, 2), new SnapshotJob(false, 25), new SendNotificationsEmailsJob(false, 5) }; GC.KeepAlive(Jobs); timerShowStackedNotifications.Interval = 3000; timerShowStackedNotifications.Elapsed += timerShowStackedNotifications_Elapsed; timerShowStackedNotifications.Start(); if (Debugger.IsAttached) { timerTest.Interval = 3000; timerTest.Elapsed += timerTest_Elapsed; timerTest.Start(); } //Action test1 = () => OnSiteChangeNotificationLogged(1, "http://www.google.com", "Google", "-1 \n-2"); //Action test2 = () => OnSiteChangeNotificationLogged(1, "http://www.uol.com.br", "Uol", "-1sdsd \n-2rsrs"); //notificationsToProcess.Push(test1); //notificationsToProcess.Push(test2); }
public void SetUp() { ServiceLocatorInitializer.Init(); supportTeamManagementService = MockRepository.GenerateMock <ISupportTeamManagementService>(); supportTeamSearchManagementService = MockRepository.GenerateMock <ISupportTeamSearchManagementService>(); _personManagementService = MockRepository.GenerateMock <IPersonManagementService>(); _authenticationProvider = MockRepository.GenerateMock <IAuthenticationProvider>(); supportTeamsController = new SupportTeamsController(supportTeamManagementService, supportTeamSearchManagementService, _personManagementService, _authenticationProvider); }
public void SetUp() { ServiceLocatorInitializer.Init(); _requestEstimateManagementService = MockRepository.GenerateMock <IRequestEstimateManagementService>(); _personManagementService = MockRepository.GenerateMock <IPersonManagementService>(); _authenticationProvider = MockRepository.GenerateMock <IAuthenticationProvider>(); _requestEstimatesController = new RequestEstimatesController(_requestEstimateManagementService, _personManagementService, _authenticationProvider); }