Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Tests/Cruds/PatrocinadorCrudMemoryTests.cs @ 137:2d1adbaf0373
CRUD de Patrocinador
author | nelopauselli |
---|---|
date | Thu, 28 Jul 2011 09:26:24 -0300 |
parents | |
children | 5346c0500594 |
comparison
equal
deleted
inserted
replaced
136:462a78196d11 | 137:2d1adbaf0373 |
---|---|
1 using System; | |
2 using AltNetHispano.Agendas.Domain; | |
3 using AltNetHispano.Agendas.Repositories.Memory; | |
4 using Moq; | |
5 using NUnit.Framework; | |
6 | |
7 namespace AltNetHispano.Agendas.Tests.Cruds | |
8 { | |
9 [TestFixture] | |
10 public class PatrocinadorCrudMemoryTests | |
11 { | |
12 private PatrocinadorCrud _eventoCrud; | |
13 | |
14 #region SetUp | |
15 | |
16 [SetUp] | |
17 public void BorrarRepositorios() | |
18 { | |
19 PatrocinadorRepository.Clear(); | |
20 } | |
21 | |
22 [SetUp] | |
23 public void SetearUsuario() | |
24 { | |
25 var seguridad = new Mock<ISeguridad>(); | |
26 seguridad.Setup(s => s.GetUserName()).Returns("neluz"); | |
27 IdentityContext.Init(seguridad.Object, new PersonaRepository()); | |
28 } | |
29 | |
30 [SetUp] | |
31 public void CreateCrud() | |
32 { | |
33 _eventoCrud = new PatrocinadorCrud(() => new PatrocinadorRepository(), () => new Mock<IDisposable>().Object); | |
34 } | |
35 | |
36 #endregion | |
37 | |
38 [Test] | |
39 public void Create() | |
40 { | |
41 _eventoCrud.Create(); | |
42 } | |
43 | |
44 [Test] | |
45 public void Read() | |
46 { | |
47 _eventoCrud.Read(); | |
48 } | |
49 | |
50 [Test] | |
51 public void Update() | |
52 { | |
53 _eventoCrud.Update(); | |
54 } | |
55 | |
56 [Test] | |
57 public void Delete() | |
58 { | |
59 _eventoCrud.Delete(); | |
60 } | |
61 | |
62 } | |
63 } |