comparison Agendas/trunk/src/Agendas.Tests/PersonaServiceTests.cs @ 157:f17252543cbf

Agregando la url del blog a los datos de la persona
author Nelo@Guinea.neluz.int
date Thu, 04 Aug 2011 18:45:18 -0300
parents 5a1f7233aa5a
children 222362c29416
comparison
equal deleted inserted replaced
156:6e554de521aa 157:f17252543cbf
64 public void Agregar_y_modificar_persona() 64 public void Agregar_y_modificar_persona()
65 { 65 {
66 var personaRepository = DefaultPersonaRepository; 66 var personaRepository = DefaultPersonaRepository;
67 67
68 var personaService = new PersonaService(personaRepository); 68 var personaService = new PersonaService(personaRepository);
69 var r = personaService.Add("Mariano Pauselli", "marianopauselli", string.Empty); 69 var r = personaService.Add("Mariano Pauselli", "marianopauselli", string.Empty, string.Empty);
70 Assert.IsTrue(r.Succeful); 70 Assert.IsTrue(r.Succeful);
71 71
72 var todas = personaService.GetAll(); 72 var todas = personaService.GetAll();
73 Assert.AreEqual(2, todas.Count()); 73 Assert.AreEqual(2, todas.Count());
74 74
79 var p2 = personaService.GetById(personaId); 79 var p2 = personaService.GetById(personaId);
80 80
81 Assert.AreEqual(p1, p2); 81 Assert.AreEqual(p1, p2);
82 Assert.AreSame(p1, p2); 82 Assert.AreSame(p1, p2);
83 83
84 personaService.Update(personaId, p1.Nombre, p1.Twitter, "marianopauselli@gmail.com"); 84 personaService.Update(personaId, p1.Nombre, p1.Twitter, "marianopauselli@gmail.com", string.Empty);
85 85
86 var p3 = personaService.GetById(personaId); 86 var p3 = personaService.GetById(personaId);
87 Assert.IsNotNull(p3); 87 Assert.IsNotNull(p3);
88 Assert.AreEqual("marianopauselli@gmail.com",p3.Mail); 88 Assert.AreEqual("marianopauselli@gmail.com",p3.Mail);
89 } 89 }