annotate Agendas/trunk/src/Agendas.Tests/Cruds/EventoTests.cs @ 60:02e163f2ca38

Refactoring de test de crud del evento
author nelopauselli
date Mon, 16 May 2011 21:40:40 -0300
parents
children c40b97bbed01
rev   line source
60
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
1 using System;
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
2 using AltNetHispano.Agendas.Repositories.Memory;
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
3 using Moq;
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
4 using NUnit.Framework;
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
5
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
6 namespace AltNetHispano.Agendas.Tests.Cruds
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
7 {
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
8 [TestFixture]
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
9 public class EventoCrudTests : TestBase
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
10 {
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
11 private EventoCrud _eventoCrud;
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
12
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
13 [SetUp]
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
14 public void CreateCrud()
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
15 {
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
16 _eventoCrud = new EventoCrud(() => new EventoRepository(), () => new Mock<IDisposable>().Object);
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
17
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
18 }
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
19
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
20 [Test]
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
21 public void Create()
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
22 {
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
23 _eventoCrud.Create();
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
24 }
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
25
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
26 [Test]
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
27 public void Read()
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
28 {
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
29 _eventoCrud.Read();
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
30 }
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
31
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
32 [Test]
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
33 public void Update()
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
34 {
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
35 _eventoCrud.Update();
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
36 }
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
37
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
38 [Test]
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
39 public void Delete()
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
40 {
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
41 _eventoCrud.Delete();
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
42 }
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
43
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
44 }
02e163f2ca38 Refactoring de test de crud del evento
nelopauselli
parents:
diff changeset
45 }