annotate Agendas/trunk/src/Agendas.Tests/TestBase.cs @ 34:475be11edf56

Ajuste en los nombre de los assemblies y namespaces
author nelo@MTEySS.neluz.int
date Thu, 17 Mar 2011 16:59:29 -0300
parents 41b283d27e3e
children 3ebe89c88caa
rev   line source
34
475be11edf56 Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents: 24
diff changeset
1 using AltNetHispano.Agendas.Domain;
22
d6e124e5c9c4 DefaultEventoRepository en tests
nelo@MTEySS.neluz.int
parents: 20
diff changeset
2 using AltNetHispano.Agendas.Domain.Repositories;
34
475be11edf56 Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents: 24
diff changeset
3 using AltNetHispano.Agendas.Repositories.Memory;
20
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
4 using Moq;
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
5 using NUnit.Framework;
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
6
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
7 namespace AltNetHispano.Agendas.Tests
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
8 {
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
9 public class TestBase
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
10 {
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
11 protected static ISeguridad SeguridadServiceDefault
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
12 {
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
13 get
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
14 {
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
15 var seguridad = new Mock<ISeguridad>();
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
16 seguridad.Setup(s => s.GetPrincipal()).Returns(SeguridadObjectMother.GetGenericPrincipalAutenticadoSinRoles());
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
17 return seguridad.Object;
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
18 }
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
19 }
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
20
22
d6e124e5c9c4 DefaultEventoRepository en tests
nelo@MTEySS.neluz.int
parents: 20
diff changeset
21 protected static IEventoRepository DefaultEventoRepository
d6e124e5c9c4 DefaultEventoRepository en tests
nelo@MTEySS.neluz.int
parents: 20
diff changeset
22 {
d6e124e5c9c4 DefaultEventoRepository en tests
nelo@MTEySS.neluz.int
parents: 20
diff changeset
23 get { return new EventoRepository(); }
d6e124e5c9c4 DefaultEventoRepository en tests
nelo@MTEySS.neluz.int
parents: 20
diff changeset
24 }
d6e124e5c9c4 DefaultEventoRepository en tests
nelo@MTEySS.neluz.int
parents: 20
diff changeset
25
24
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
26 protected static IPonenteRepository DefaultPonenteRepository
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
27 {
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
28 get { return new PonenteRepository(); }
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
29 }
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
30
20
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
31 [SetUp]
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
32 public void LimpiarEventos()
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
33 {
24
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
34 EventoRepository.Clear();
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
35 }
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
36
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
37 [SetUp]
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
38 public void LimpiarPonentes()
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
39 {
41b283d27e3e Ponentes como entidad
nelo@MTEySS.neluz.int
parents: 22
diff changeset
40 PonenteRepository.Clear();
20
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
41 }
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
42 }
c5a99dde072f reorganizando tests
nelo@MTEySS.neluz.int
parents:
diff changeset
43 }