Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Tests/Cruds/EventoTests.cs @ 109:6bd9be78caa0
Merge
author | Nelo@Kenia.neluz.int |
---|---|
date | Tue, 07 Jun 2011 23:21:07 -0300 |
parents | db4b1e2cae49 |
children |
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 EventoCrudMemoryTests { private EventoCrud _eventoCrud; #region SetUp [SetUp] public void BorrarRepositorios() { EventoRepository.Clear(); 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() { _eventoCrud = new EventoCrud(() => new EventoRepository(), ()=>new PersonaRepository(), () => new Mock<IDisposable>().Object); } #endregion [Test] public void Create() { _eventoCrud.Create(); } [Test] public void Read() { _eventoCrud.Read(); } [Test] public void Update() { _eventoCrud.Update(); } [Test] public void Delete() { _eventoCrud.Delete(); } } }