Esempio n. 1
0
        protected void Run(Action <ISession, ServiceConfiguration> method)
        {
            var serviceSession = sessionFactory.OpenSession();

            using (serviceSession)
            {
                timerService = new MockTimerService();
                ServiceConfiguration config = new ServiceConfiguration(timerService);
                //var service = new InternalBodyArchitectService(serviceSession, SecurityManager, new MockEmailService(), new MockPushNotificationService(), config);
                config.ImagesFolder = ImagesFolder;
                method(serviceSession, config);
            }
            Session.Clear();
        }
Esempio n. 2
0
        protected void RunServiceMethod(Action <InternalBodyArchitectService> method)
        {
            var serviceSession = sessionFactory.OpenSession();

            using (serviceSession)
            {
                timerService = new MockTimerService();
                ServiceConfiguration config = new ServiceConfiguration(timerService);
                config.MethodInvoker = new NormalMethodInvoker();
                config.Payments      = paymentsManager;
                var service = new InternalBodyArchitectService(serviceSession, SecurityManager, new MockEmailService(), new MockPushNotificationService(), config);

                service.Configuration.ImagesFolder = ImagesFolder;
                NHibernateContextExtension wcfExtencsion = new NHibernateContextExtension(serviceSession);
                NHibernateContext.UnitTestContext = wcfExtencsion;
                method(service);
            }
            Session.Clear();
        }
Esempio n. 3
0
 public void setup()
 {
     timer   = new MockTimerService();
     builder = new ReminderBuilder(timer);
 }