comparison Agendas/trunk/src/Agendas.Tests/PersonaServiceTests.cs @ 180:222362c29416

UI para asignaciĆ³n de roles
author nelopauselli
date Mon, 08 Aug 2011 16:42:52 -0300
parents f17252543cbf
children bfd472758bc3
comparison
equal deleted inserted replaced
179:1deccd6c3cb2 180:222362c29416
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, string.Empty); 69 var r = personaService.Add("Mariano Pauselli", "marianopauselli", string.Empty, string.Empty, null);
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", string.Empty); 84 personaService.Update(personaId, p1.Nombre, p1.Twitter, "marianopauselli@gmail.com", string.Empty,null);
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 }