Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Tests/Cruds/EventoCrudMemoryTests.cs @ 164:93aa103f75ec
Merge
author | nelopauselli |
---|---|
date | Fri, 05 Aug 2011 21:55:45 -0300 |
parents | 3639803112c6 |
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(); } [Test] public void Workflow() { _eventoCrud.Workflow(); } } }