diff Agendas/trunk/src/Agendas.Tests/TestBase.cs @ 20:c5a99dde072f

reorganizando tests
author nelo@MTEySS.neluz.int
date Mon, 14 Mar 2011 20:59:28 -0300
parents
children d6e124e5c9c4
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Agendas/trunk/src/Agendas.Tests/TestBase.cs	Mon Mar 14 20:59:28 2011 -0300
@@ -0,0 +1,31 @@
+using Agendas.Repositories.Memory;
+using AltNetHispano.Agendas.Domain;
+using Moq;
+using NUnit.Framework;
+
+namespace AltNetHispano.Agendas.Tests
+{
+	public class TestBase
+	{
+		protected static ISeguridad SeguridadServiceDefault
+		{
+			get
+			{
+				var seguridad = new Mock<ISeguridad>();
+				seguridad.Setup(s => s.GetPrincipal()).Returns(SeguridadObjectMother.GetGenericPrincipalAutenticadoSinRoles());
+				return seguridad.Object;
+			}
+		}
+
+		[SetUp]
+		public void LimpiarEventos()
+		{
+			var repository = new EventoRepository();
+			foreach (var evento in repository.GetEventosConFecha())
+				repository.Delete(evento);
+			foreach (var evento in repository.GetEventosSinFecha())
+				repository.Delete(evento);
+		}
+
+	}
+}
\ No newline at end of file