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();
        }
        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();
        }
Beispiel #3
0
 public void setup()
 {
     timer   = new MockTimerService();
     builder = new ReminderBuilder(timer);
 }