Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Repositories.Tests/Infraestructure/NhInfraestrutureFactory.cs @ 222:68b09c30b0d2
Separando los test de persistencia en un proyecto aparte
author | nelopauselli |
---|---|
date | Mon, 19 Sep 2011 18:18:17 -0300 |
parents | |
children | 72a96459f910 |
comparison
equal
deleted
inserted
replaced
221:37ddf81333d3 | 222:68b09c30b0d2 |
---|---|
1 using System; | |
2 using Agendas.NHibernate; | |
3 using AltNetHispano.Agendas.Domain.Repositories; | |
4 using AltNetHispano.Agendas.Repositories.NHibernate; | |
5 using NHibernate; | |
6 | |
7 namespace Agendas.Repositories.Tests.Infraestructure | |
8 { | |
9 public class NhInfraestrutureFactory:IInfraestrutureFactory | |
10 { | |
11 private readonly ISessionFactory _sessionFactory; | |
12 | |
13 public NhInfraestrutureFactory() | |
14 { | |
15 _sessionFactory = NhHelper.GetSessionFactory(); | |
16 } | |
17 public IEventoRepository GetEventoRepository() | |
18 { | |
19 return new EventoRepository(_sessionFactory); | |
20 } | |
21 | |
22 public IPersonaRepository GetPonenteRepository() | |
23 { | |
24 return new PersonaRepository(_sessionFactory); | |
25 } | |
26 | |
27 public Func<IDisposable> GetRequestEmulator() | |
28 { | |
29 return () => new RequestEmulator(_sessionFactory); | |
30 } | |
31 } | |
32 } |