Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Tests/TrackTests.cs @ 70:c7264bfc4b71
agregado de properties en clase Evento (UrlInvitacion, UrlWiki, NumeroOrden)
modificaciones en proyecto Agendas.Blog
modificacion de viewmodel EventoModel - agregado de UrlInvitacion (no requerido)
author | jorge.rowies |
---|---|
date | Fri, 20 May 2011 12:21:07 -0300 |
parents | 3059a5f8930f |
children | 76567a0d1e44 |
rev | line source |
---|---|
39 | 1 using System; |
2 using System.Linq; | |
3 using AltNetHispano.Agendas.Domain; | |
4 using NUnit.Framework; | |
5 | |
6 namespace AltNetHispano.Agendas.Tests | |
7 { | |
54 | 8 [TestFixture] |
9 public class TrackTests : TestBase | |
10 { | |
70
c7264bfc4b71
agregado de properties en clase Evento (UrlInvitacion, UrlWiki, NumeroOrden)
jorge.rowies
parents:
54
diff
changeset
|
11 private const string urlInvitacion = "http://groups.google.com/group/altnet-hispano/browse_thread/thread/65d6d26eb381386e"; |
c7264bfc4b71
agregado de properties en clase Evento (UrlInvitacion, UrlWiki, NumeroOrden)
jorge.rowies
parents:
54
diff
changeset
|
12 |
54 | 13 [Test] |
14 public void Track_al_publicar_y_modificar_evento() | |
15 { | |
16 var repository = DefaultEventoRepository; | |
39 | 17 |
54 | 18 var agenda = new Agenda(null, null, repository, DefaultPonenteRepository); |
39 | 19 |
54 | 20 var fecha = DateTime.Now.AddDays(5); |
70
c7264bfc4b71
agregado de properties en clase Evento (UrlInvitacion, UrlWiki, NumeroOrden)
jorge.rowies
parents:
54
diff
changeset
|
21 agenda.Publicar("Html 5", "jjmontes", fecha, urlInvitacion); |
54 | 22 var evento = repository.GetEventosConFecha().First(); |
39 | 23 |
54 | 24 Assert.AreEqual(1, evento.Tracks.Count()); |
25 Assert.AreEqual(Accion.Publicar, evento.Tracks.Last().Accion); | |
39 | 26 |
54 | 27 agenda.ModificarEvento(evento.Id, "Html 5", "otro ponente", fecha); |
28 Assert.AreEqual(2, evento.Tracks.Count()); | |
29 Assert.AreEqual(Accion.Modificar, evento.Tracks.Last().Accion); | |
39 | 30 |
54 | 31 agenda.ModificarEvento(evento.Id, "Html 5 y Css 3", "otro ponente", fecha); |
32 Assert.AreEqual(3, evento.Tracks.Count()); | |
33 Assert.AreEqual(Accion.CambiarTitulo, evento.Tracks.Last().Accion); | |
34 } | |
39 | 35 |
54 | 36 [Test] |
37 public void Track_al_publicar_y_realizar_evento() | |
38 { | |
39 var repository = DefaultEventoRepository; | |
39 | 40 |
54 | 41 var agenda = new Agenda(null, null, repository, DefaultPonenteRepository); |
39 | 42 |
70
c7264bfc4b71
agregado de properties en clase Evento (UrlInvitacion, UrlWiki, NumeroOrden)
jorge.rowies
parents:
54
diff
changeset
|
43 agenda.Publicar("Html 5", "jjmontes", DateTime.Now, |
c7264bfc4b71
agregado de properties en clase Evento (UrlInvitacion, UrlWiki, NumeroOrden)
jorge.rowies
parents:
54
diff
changeset
|
44 urlInvitacion); |
54 | 45 var evento = repository.GetEventosConFecha().First(); |
39 | 46 |
54 | 47 Assert.AreEqual(1, evento.Tracks.Count()); |
48 Assert.AreEqual(Accion.Publicar, evento.Tracks.Last().Accion); | |
39 | 49 |
54 | 50 agenda.RealizarEvento(evento.Id, "Esta es la sintesis"); |
51 Assert.AreEqual(2, evento.Tracks.Count()); | |
52 Assert.AreEqual(Accion.Realizar, evento.Tracks.Last().Accion); | |
53 } | |
54 } | |
39 | 55 } |