Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Tests/PersonaServiceTests.cs @ 242:5cc1681d3789
Combinar
author | juanjose.montesdeocaarbos |
---|---|
date | Wed, 05 Oct 2011 07:57:21 -0300 |
parents | c61954d24c8c |
children | dba5d41bc7bf |
comparison
equal
deleted
inserted
replaced
241:a7daa939ef0c | 242:5cc1681d3789 |
---|---|
198 | 198 |
199 var agenda = new Agenda(publicador.Object, DefaultEventoRepository, DefaultPersonaRepository); | 199 var agenda = new Agenda(publicador.Object, DefaultEventoRepository, DefaultPersonaRepository); |
200 | 200 |
201 var fechaInicio = DateTime.Now.ToUniversalTime(); | 201 var fechaInicio = DateTime.Now.ToUniversalTime(); |
202 var fechaTermino = fechaInicio.AddHours(2); | 202 var fechaTermino = fechaInicio.AddHours(2); |
203 agenda.Agendar("Van para publicar", TestsHelper.GetOrCreatePonente("alabra"), fechaInicio, fechaTermino, | 203 agenda.Agendar("Van para publicar", new[]{TestsHelper.GetOrCreatePonente("alabra")}, fechaInicio, fechaTermino, |
204 "http://groups.google.com/group/altnet-hispano/browse_thread/thread/65d6d26eb381386e", TipoEvento.Van); | 204 "http://groups.google.com/group/altnet-hispano/browse_thread/thread/65d6d26eb381386e", TipoEvento.Van); |
205 | 205 |
206 Assert.AreEqual(0, agenda.GetEventosActivos(EventoPropuestoState.GetInstance()).Count); | 206 Assert.AreEqual(0, agenda.GetEventosActivos(EventoPropuestoState.GetInstance()).Count); |
207 | 207 |
208 var eventos = agenda.GetEventosActivos(); | 208 var eventos = agenda.GetEventosActivos(); |
209 Assert.AreEqual(1, eventos.Count); | 209 Assert.AreEqual(1, eventos.Count); |
210 | 210 |
211 var evento = eventos[0]; | 211 var evento = eventos[0]; |
212 Assert.IsNotNull(evento.Ponente); | 212 |
213 | 213 var ponente = evento.Ponentes.FirstOrDefault(); |
214 var delete = personaService.Delete(evento.Ponente.Id); | 214 Assert.IsNotNull(ponente); |
215 | |
216 var delete = personaService.Delete(ponente.Id); | |
215 Assert.IsFalse(delete.Succeful); | 217 Assert.IsFalse(delete.Succeful); |
216 } | 218 } |
217 } | 219 } |
218 } | 220 } |