Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Tests/TrackTests.cs @ 52:7b3a32bbdfa0
corrección de test que no verificaba lo que decía verificar
author | nelopauselli |
---|---|
date | Sat, 14 May 2011 12:17:35 -0300 |
parents | 3ebe89c88caa |
children | 3059a5f8930f |
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 { [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); 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); 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); } } }