comparison 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
comparison
equal deleted inserted replaced
69:8becac0977d7 70:c7264bfc4b71
6 namespace AltNetHispano.Agendas.Tests 6 namespace AltNetHispano.Agendas.Tests
7 { 7 {
8 [TestFixture] 8 [TestFixture]
9 public class TrackTests : TestBase 9 public class TrackTests : TestBase
10 { 10 {
11 private const string urlInvitacion = "http://groups.google.com/group/altnet-hispano/browse_thread/thread/65d6d26eb381386e";
12
11 [Test] 13 [Test]
12 public void Track_al_publicar_y_modificar_evento() 14 public void Track_al_publicar_y_modificar_evento()
13 { 15 {
14 var repository = DefaultEventoRepository; 16 var repository = DefaultEventoRepository;
15 17
16 var agenda = new Agenda(null, null, repository, DefaultPonenteRepository); 18 var agenda = new Agenda(null, null, repository, DefaultPonenteRepository);
17 19
18 var fecha = DateTime.Now.AddDays(5); 20 var fecha = DateTime.Now.AddDays(5);
19 agenda.Publicar("Html 5", "jjmontes", fecha); 21 agenda.Publicar("Html 5", "jjmontes", fecha, urlInvitacion);
20 var evento = repository.GetEventosConFecha().First(); 22 var evento = repository.GetEventosConFecha().First();
21 23
22 Assert.AreEqual(1, evento.Tracks.Count()); 24 Assert.AreEqual(1, evento.Tracks.Count());
23 Assert.AreEqual(Accion.Publicar, evento.Tracks.Last().Accion); 25 Assert.AreEqual(Accion.Publicar, evento.Tracks.Last().Accion);
24 26
36 { 38 {
37 var repository = DefaultEventoRepository; 39 var repository = DefaultEventoRepository;
38 40
39 var agenda = new Agenda(null, null, repository, DefaultPonenteRepository); 41 var agenda = new Agenda(null, null, repository, DefaultPonenteRepository);
40 42
41 agenda.Publicar("Html 5", "jjmontes", DateTime.Now); 43 agenda.Publicar("Html 5", "jjmontes", DateTime.Now,
44 urlInvitacion);
42 var evento = repository.GetEventosConFecha().First(); 45 var evento = repository.GetEventosConFecha().First();
43 46
44 Assert.AreEqual(1, evento.Tracks.Count()); 47 Assert.AreEqual(1, evento.Tracks.Count());
45 Assert.AreEqual(Accion.Publicar, evento.Tracks.Last().Accion); 48 Assert.AreEqual(Accion.Publicar, evento.Tracks.Last().Accion);
46 49