Mercurial > altnet-hispano
view 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 |
line wrap: on
line source
using System; using System.Linq; using AltNetHispano.Agendas.Domain; using NUnit.Framework; namespace AltNetHispano.Agendas.Tests { [TestFixture] public class TrackTests : TestBase { private const string urlInvitacion = "http://groups.google.com/group/altnet-hispano/browse_thread/thread/65d6d26eb381386e"; [Test] public void Track_al_publicar_y_modificar_evento() { var repository = DefaultEventoRepository; var agenda = new Agenda(null, null, repository, DefaultPonenteRepository); var fecha = DateTime.Now.AddDays(5); agenda.Publicar("Html 5", "jjmontes", fecha, urlInvitacion); var evento = repository.GetEventosConFecha().First(); Assert.AreEqual(1, evento.Tracks.Count()); Assert.AreEqual(Accion.Publicar, evento.Tracks.Last().Accion); agenda.ModificarEvento(evento.Id, "Html 5", "otro ponente", fecha); Assert.AreEqual(2, evento.Tracks.Count()); Assert.AreEqual(Accion.Modificar, evento.Tracks.Last().Accion); agenda.ModificarEvento(evento.Id, "Html 5 y Css 3", "otro ponente", fecha); Assert.AreEqual(3, evento.Tracks.Count()); Assert.AreEqual(Accion.CambiarTitulo, evento.Tracks.Last().Accion); } [Test] public void Track_al_publicar_y_realizar_evento() { var repository = DefaultEventoRepository; var agenda = new Agenda(null, null, repository, DefaultPonenteRepository); agenda.Publicar("Html 5", "jjmontes", DateTime.Now, urlInvitacion); var evento = repository.GetEventosConFecha().First(); Assert.AreEqual(1, evento.Tracks.Count()); Assert.AreEqual(Accion.Publicar, evento.Tracks.Last().Accion); agenda.RealizarEvento(evento.Id, "Esta es la sintesis"); Assert.AreEqual(2, evento.Tracks.Count()); Assert.AreEqual(Accion.Realizar, evento.Tracks.Last().Accion); } } }