diff Agendas/trunk/src/Agendas.Tests/Workflows/Workflow.cs @ 81:c76661cff260

Workflow de acciones sobre un evento (camino feliz)
author nelopauselli
date Tue, 24 May 2011 19:21:20 -0300
parents
children 26d0513a8410
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Agendas/trunk/src/Agendas.Tests/Workflows/Workflow.cs	Tue May 24 19:21:20 2011 -0300
@@ -0,0 +1,43 @@
+using System;
+using AltNetHispano.Agendas.Domain;
+using AltNetHispano.Agendas.Domain.Repositories;
+using NUnit.Framework;
+
+namespace AltNetHispano.Agendas.Tests.Workflows
+{
+	internal class Workflow
+	{
+		private readonly Agenda _agenda;
+
+		public Workflow(IPublicador publicador, IEventoRepository eventoRepository, IPonenteRepository ponenteRepository)
+		{
+			_agenda = new Agenda(publicador, null, eventoRepository, ponenteRepository);
+		}
+
+		public void Proponer()
+		{
+
+			var resultado = _agenda.Proponer("SOLID", "Jorge", null);
+			Assert.IsTrue(resultado.Succeful);
+		}
+
+
+		public void Agendar()
+		{
+			var resultado = _agenda.Agendar("SOLID", "Jorge", DateTime.Today.AddDays(5), null);
+			Assert.IsTrue(resultado.Succeful);
+		}
+
+		public void Confirmar(Guid eventoId)
+		{
+			var resultado = _agenda.Confirmar(eventoId);
+			Assert.IsTrue(resultado.Succeful);
+		}
+
+		public void Publicar(Guid eventoId)
+		{
+			var resultado = _agenda.Publicar(eventoId);
+			Assert.IsTrue(resultado.Succeful);
+		}
+	}
+}
\ No newline at end of file