Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Tests/Cruds/EventoCrudMemoryTests.cs @ 142:62dc9fb3a03e
Quitando cuentas BuiltIn
author | Nelo@Guinea.neluz.int |
---|---|
date | Mon, 01 Aug 2011 00:28:04 -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(); } } }