Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Repositories.Tests/PersonaCrud.cs @ 255:50442a103281
Ticket #190: Que el listado de Personas venga ordenado por Nombre.
author | juanjose.montesdeocaarbos |
---|---|
date | Mon, 17 Oct 2011 08:54:45 -0300 |
parents | 68b09c30b0d2 |
children | 1ca7c39ad38b |
comparison
equal
deleted
inserted
replaced
249:7cf64cd790ab | 255:50442a103281 |
---|---|
181 { | 181 { |
182 var persona = _personaRepository.Get(personaId); | 182 var persona = _personaRepository.Get(personaId); |
183 Assert.IsNull(persona); | 183 Assert.IsNull(persona); |
184 } | 184 } |
185 } | 185 } |
186 | |
187 [Test] | |
188 public void GetAllPersonaSortByName() | |
189 { | |
190 using (_requestEmulator.Invoke()) | |
191 { | |
192 CreatePersona("Pablo Morales", "pablomorales", "pablomorales@gmail.com", | |
193 "http://pablomorales.blogspot.com", | |
194 new[] {Roles.Usuario}); | |
195 } | |
196 | |
197 using (_requestEmulator.Invoke()) | |
198 { | |
199 CreatePersona("Nelo Pauselli", "nelopauselli", "nelopauselli@gmail.com", | |
200 "http://nelopauselli.blogspot.com", | |
201 null); | |
202 } | |
203 | |
204 using (_requestEmulator.Invoke()) | |
205 { | |
206 CreatePersona("Jorge Gamba", "jorgegamba", "jorgegamba@gmail.com", | |
207 "http://nelopauselli.blogspot.com", | |
208 null); | |
209 } | |
210 | |
211 using (_requestEmulator.Invoke()) | |
212 { | |
213 var personas = _personaRepository.GetAll(); | |
214 var primeraPersona = personas[0]; | |
215 var segundaPersona = personas[1]; | |
216 var terceraPersona = personas[2]; | |
217 | |
218 Assert.AreEqual("Jorge Gamba", primeraPersona.Nombre); | |
219 Assert.AreEqual("Nelo Pauselli", segundaPersona.Nombre); | |
220 Assert.AreEqual("Pablo Morales", terceraPersona.Nombre); | |
221 } | |
222 } | |
186 } | 223 } |
187 } | 224 } |