Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Tests/TestsHelper.cs @ 189:fe47f11f5f20
Adapter para url shorten de google
author | nelopauselli |
---|---|
date | Tue, 09 Aug 2011 09:38:28 -0300 |
parents | e6e6bfb1da9e |
children | 6382e35625c5 |
line wrap: on
line source
using System; using AltNetHispano.Agendas.Domain; using AltNetHispano.Agendas.Repositories.Memory; namespace AltNetHispano.Agendas.Tests { public static class TestsHelper { public static Guid GetOrCreatePonente(string nombre) { var repository = new PersonaRepository(); var persona = repository.GetByNombre(nombre); if (persona == null) { persona = new Persona(nombre) { Twitter = nombre.Replace(" ", string.Empty).ToLower() }; repository.Save(persona); } return persona.Id; } } }