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