diff Agendas/trunk/src/Agendas.Domain/Agenda.cs @ 161:c1062de96845

Al publicar una agenda el nroOrden debe ser mayor a cero y urlWiki no vacio.
author juanjose.montesdeocaarbos
date Fri, 05 Aug 2011 21:54:43 -0300
parents e6e6bfb1da9e
children 5c94b052d838
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Domain/Agenda.cs	Fri Aug 05 21:39:37 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Domain/Agenda.cs	Fri Aug 05 21:54:43 2011 -0300
@@ -125,6 +125,12 @@
 
         public Resultado Publicar(Guid eventoId, short numeroOrden, string urlWiki)
         {
+            if (numeroOrden <= 0)
+                throw new ArgumentOutOfRangeException("numeroOrden");
+
+            if (string.IsNullOrWhiteSpace(urlWiki))
+                throw new ArgumentException("urlWiki");
+
             Evento evento = GetEvento(eventoId);
 
             evento.Publicar(numeroOrden, urlWiki);