changeset 197:bfd472758bc3

Agregando validaciones para subir el Coverage.
author juanjose.montesdeocaarbos
date Sat, 13 Aug 2011 02:40:00 -0300
parents bb7a60c28d8d
children cd96cfc8a1f5 04972ef8b6d2
files Agendas/trunk/src/Agendas.Tests/PersonaServiceTests.cs Agendas/trunk/src/Agendas.Tests/PropuestasTests.cs
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Tests/PersonaServiceTests.cs	Sat Aug 13 01:52:00 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Tests/PersonaServiceTests.cs	Sat Aug 13 02:40:00 2011 -0300
@@ -1,4 +1,5 @@
-using System.Linq;
+using System;
+using System.Linq;
 using AltNetHispano.Agendas.Domain;
 using AltNetHispano.Agendas.Domain.Repositories;
 using AltNetHispano.Agendas.Domain.Services;
@@ -130,5 +131,15 @@
 			Assert.AreEqual(IdentityProviderEnum.Twitter, builtIn.IdentityProvider);
 			Assert.AreEqual("nelo", builtIn.LogonName);
 		}
+
+		[Test]
+		public void Modificar_persona_inexistente()
+		{
+			var personaRepository = DefaultPersonaRepository;
+			var personaService = new PersonaService(personaRepository);
+			var r = personaService.Update(new Guid(), "Mariano Pauselli", "marianopauselli", "marianopauselli@gmail.com", string.Empty, null);
+
+			Assert.IsFalse(r.Succeful);
+		}
 	}
 }
\ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Tests/PropuestasTests.cs	Sat Aug 13 01:52:00 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Tests/PropuestasTests.cs	Sat Aug 13 02:40:00 2011 -0300
@@ -67,6 +67,10 @@
 			    var r = agenda.Agendar(van.Titulo, TestsHelper.GetOrCreatePonente("Ponente"), null, null,
 			                           urlInvitacion, TipoEvento.Van);
 				Assert.IsFalse(r.Succeful);
+				
+				r = agenda.Agendar(van.Titulo, TestsHelper.GetOrCreatePonente("Ponente"), DateTime.MinValue, null,
+									   urlInvitacion, TipoEvento.Van);
+				Assert.IsFalse(r.Succeful);
 			}
 		}