Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Tests/TestBase.cs @ 112:0bca45e1e664
Pantalla de Perfil donde se puede asociar la cuenta de twitter al usuario existente
author | Nelo@Kenia.neluz.int |
---|---|
date | Sat, 11 Jun 2011 01:20:59 -0300 |
parents | db4b1e2cae49 |
children | 7a2eeb9e9bf9 |
comparison
equal
deleted
inserted
replaced
111:90ce239cfa6d | 112:0bca45e1e664 |
---|---|
33 } | 33 } |
34 | 34 |
35 protected static void SetCurrentUser(string username, string nombre) | 35 protected static void SetCurrentUser(string username, string nombre) |
36 { | 36 { |
37 const IdentityProviderEnum identityProvider = IdentityProviderEnum.Twitter; | 37 const IdentityProviderEnum identityProvider = IdentityProviderEnum.Twitter; |
38 string logonName = null; | |
39 if (username != null) | |
40 logonName = Identification.Map[(int) IdentityProviderEnum.Twitter] + username; | |
38 | 41 |
39 var seguridad = new Mock<ISeguridad>(); | 42 var seguridad = new Mock<ISeguridad>(); |
40 seguridad.Setup(s => s.GetUserName()).Returns(username); | 43 seguridad.Setup(s => s.GetUserName()).Returns(logonName); |
41 | 44 |
42 IPersonaRepository personaRepository = new PersonaRepository(); | 45 IPersonaRepository personaRepository = new PersonaRepository(); |
43 var service = new PersonaService(personaRepository); | 46 var service = new PersonaService(personaRepository); |
44 service.Validate(identityProvider, username, nombre); | 47 service.Validate(identityProvider, username, nombre); |
45 | 48 |