Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Tests/Cruds/PersonaCrudMemoryTests.cs @ 189:fe47f11f5f20
Adapter para url shorten de google
author | nelopauselli |
---|---|
date | Tue, 09 Aug 2011 09:38:28 -0300 |
parents | 33e57fd1a6c9 |
children | a36a76bd6ec3 |
line wrap: on
line source
using System; using AltNetHispano.Agendas.Domain; using AltNetHispano.Agendas.Repositories.Memory; using Moq; using NUnit.Framework; namespace AltNetHispano.Agendas.Tests.Cruds { [TestFixture] public class PersonaCrudMemoryTests : IPersonaCrudTest { private PersonaCrud _test; #region SetUp [SetUp] public void BorrarRepositorios() { PersonaRepository.Clear(); } [SetUp] public void SetearUsuario() { var seguridad = new Mock<ISeguridad>(); seguridad.Setup(s => s.GetUserName()).Returns("neluz"); IdentityContext.Init(seguridad.Object, new PersonaRepository()); } [SetUp] public void CreateCrud() { _test = new PersonaCrud(() => new PersonaRepository(), () => new Mock<IDisposable>().Object); } #endregion [Test] public void CreateAdministrador() { _test.CreateAdministrador(); } [Test] public void ReadAdministrador() { _test.ReadAdministrador(); } [Test] public void CreateUsuario() { _test.CreateUsuario(); } [Test] public void ReadUsuario() { _test.ReadUsuario(); } [Test] public void Update() { _test.Update(); } } }