20
|
1 using Agendas.Repositories.Memory;
|
|
2 using AltNetHispano.Agendas.Domain;
|
22
|
3 using AltNetHispano.Agendas.Domain.Repositories;
|
20
|
4 using Moq;
|
|
5 using NUnit.Framework;
|
|
6
|
|
7 namespace AltNetHispano.Agendas.Tests
|
|
8 {
|
|
9 public class TestBase
|
|
10 {
|
|
11 protected static ISeguridad SeguridadServiceDefault
|
|
12 {
|
|
13 get
|
|
14 {
|
|
15 var seguridad = new Mock<ISeguridad>();
|
|
16 seguridad.Setup(s => s.GetPrincipal()).Returns(SeguridadObjectMother.GetGenericPrincipalAutenticadoSinRoles());
|
|
17 return seguridad.Object;
|
|
18 }
|
|
19 }
|
|
20
|
22
|
21 protected static IEventoRepository DefaultEventoRepository
|
|
22 {
|
|
23 get { return new EventoRepository(); }
|
|
24 }
|
|
25
|
20
|
26 [SetUp]
|
|
27 public void LimpiarEventos()
|
|
28 {
|
|
29 var repository = new EventoRepository();
|
22
|
30 foreach (Evento evento in repository.GetEventosConFecha())
|
20
|
31 repository.Delete(evento);
|
22
|
32 foreach (Evento evento in repository.GetEventosSinFecha())
|
20
|
33 repository.Delete(evento);
|
|
34 }
|
|
35 }
|
|
36 } |