# HG changeset patch # User juanjose.montesdeocaarbos # Date 1328668146 10800 # Node ID 15b428ae5931029713d3f169113d62eea5d8f6fd # Parent 8b0c62c255cd09778239d0dd8a300f152877a0b5# Parent a6037c6c88d8fd02a4964c2b1499f8e8f0a5c835 Combinar diff -r 8b0c62c255cd -r 15b428ae5931 Agendas/trunk/src/Agendas.Google.Test/PublicadorTest.cs --- a/Agendas/trunk/src/Agendas.Google.Test/PublicadorTest.cs Tue Feb 07 23:28:20 2012 -0300 +++ b/Agendas/trunk/src/Agendas.Google.Test/PublicadorTest.cs Tue Feb 07 23:29:06 2012 -0300 @@ -223,5 +223,45 @@ "\n\rPara mayor información sobre cómo atender la reunión consulten: http://tinyurl.com/van-hispano" + "\n\rPueden vincular el Google Calendar al suyo (http://screenr.com/nr7)", detail.Summary); } + + [Test] + public void CuandoHoraEventoDiferente1800DadoTipoVanEntoncesSummaryCorrecto() + { + var adapter = new Mock(); + var detail = new VanGEventDetail(); + var fechaInicio = new DateTime(2011, 07, 09, 17, 0, 0, DateTimeKind.Utc); + var fechaTermino = fechaInicio.AddHours(2); + + var publicador = new GooglePublicador(adapter.Object); + var agenda = new Agenda(publicador, DefaultEventoRepository, DefaultPersonaRepository, DefaultPatrocinadorRepository); + agenda.Proponer("Agile Patterns", null, null, TipoEvento.Van); + agenda.Agendar("Agile Patterns", new[] { TestsHelper.GetOrCreatePonente("Alejandro Labra") }, fechaInicio, + fechaTermino, "https://groups.google.com/d/topic/altnet-hispano/arYEMsPiAtY/discussion", + TipoEvento.Van); + + var ev = DefaultEventoRepository.GetActivos()[0]; + detail.Generate(ev); + + Assert.AreEqual("http://snipr.com/virtualaltnet", detail.Location); + Assert.AreEqual("VAN sobre Agile Patterns", detail.Title); + + Assert.AreEqual(DateTimeKind.Utc, detail.StartEvent.Kind); + Assert.AreEqual(ev.FechaInicio.Value.Hour, detail.StartEvent.Hour); + Assert.AreEqual(ev.FechaInicio.Value.Day, detail.StartEvent.Day); + Assert.AreEqual(ev.FechaInicio.Value.Month, detail.StartEvent.Month); + Assert.AreEqual(ev.FechaInicio.Value.Year, detail.StartEvent.Year); + + Assert.AreEqual(DateTimeKind.Utc, detail.EndEvent.Kind); + Assert.AreEqual(ev.FechaTermino.Value.Hour, detail.EndEvent.Hour); + Assert.AreEqual(ev.FechaTermino.Value.Day, detail.EndEvent.Day); + Assert.AreEqual(ev.FechaTermino.Value.Month, detail.EndEvent.Month); + Assert.AreEqual(ev.FechaTermino.Value.Year, detail.EndEvent.Year); + + Assert.AreEqual("La comunidad ALT.NET Hispano (http://altnethispano.org) realizará una VAN sobre Agile Patterns, con Alejandro Labra." + + "\n\rFecha: sábado, 09 de julio de 2011 a las 17:00 hrs. Hora Internacional (GMT/UTC), con una duración aproximada de 2 horas." + + "\n\rPueden plantear sus comentarios e inquietudes sobre el tema de la reunión en: https://groups.google.com/d/topic/altnet-hispano/arYEMsPiAtY/discussion" + + "\n\rPara mayor información sobre cómo atender la reunión consulten: http://tinyurl.com/van-hispano" + + "\n\rPueden vincular el Google Calendar al suyo (http://screenr.com/nr7)", detail.Summary); + } } } \ No newline at end of file diff -r 8b0c62c255cd -r 15b428ae5931 Agendas/trunk/src/Agendas.Google/DetailsEvents/CafeGEventDetail.cs --- a/Agendas/trunk/src/Agendas.Google/DetailsEvents/CafeGEventDetail.cs Tue Feb 07 23:28:20 2012 -0300 +++ b/Agendas/trunk/src/Agendas.Google/DetailsEvents/CafeGEventDetail.cs Tue Feb 07 23:29:06 2012 -0300 @@ -8,7 +8,7 @@ { private const string TextoCafe = "La comunidad ALT.NET Hispano (http://altnethispano.org) realizará un Alt.Net Cafe virtual con el tema [NOMBRE]." + - "\n\rFecha: [FECHA] a las 18:00 hrs. Hora Internacional (GMT/UTC), con una duración aproximada de 2 horas." + + "\n\rFecha: [FECHA] a las [HORA] hrs. Hora Internacional (GMT/UTC), con una duración aproximada de 2 horas." + "\n\rPueden plantear sus comentarios e inquietudes sobre el tema de la reunión en: [URL_DISCUCION]" + "\n\rPara mayor información sobre cómo atender la reunión consulten: http://tinyurl.com/van-hispano" + "\n\rPueden vincular el Google Calendar al suyo (http://screenr.com/nr7)"; @@ -30,7 +30,7 @@ Summary = TextoCafe.Replace("[NOMBRE]", evento.Titulo). Replace("[FECHA]", StartEvent.ToString("D", cultureInfo)). - Replace("[URL_DISCUCION]", evento.UrlInvitacion); + Replace("[URL_DISCUCION]", evento.UrlInvitacion).Replace("[HORA]", StartEvent.ToShortTimeString()); } } } \ No newline at end of file diff -r 8b0c62c255cd -r 15b428ae5931 Agendas/trunk/src/Agendas.Google/DetailsEvents/EstudioGEventDetail.cs --- a/Agendas/trunk/src/Agendas.Google/DetailsEvents/EstudioGEventDetail.cs Tue Feb 07 23:28:20 2012 -0300 +++ b/Agendas/trunk/src/Agendas.Google/DetailsEvents/EstudioGEventDetail.cs Tue Feb 07 23:29:06 2012 -0300 @@ -8,7 +8,7 @@ { private const string TextoEstudio = "La comunidad ALT.NET Hispano (http://altnethispano.org) realizará un grupo de estudio sobre [NOMBRE]." + - "\n\rFecha: [FECHA] a las 18:00 hrs. Hora Internacional (GMT/UTC), con una duración aproximada de 2 horas." + + "\n\rFecha: [FECHA] a las [HORA] hrs. Hora Internacional (GMT/UTC), con una duración aproximada de 2 horas." + "\n\rPueden plantear sus comentarios e inquietudes sobre el tema de la reunión en: [URL_DISCUCION]" + "\n\rPara mayor información sobre cómo atender la reunión consulten: http://tinyurl.com/van-hispano" + "\n\rPueden vincular el Google Calendar al suyo (http://screenr.com/nr7)"; @@ -30,7 +30,7 @@ Summary = TextoEstudio.Replace("[NOMBRE]", evento.Titulo). Replace("[FECHA]", StartEvent.ToString("D", cultureInfo)). - Replace("[URL_DISCUCION]", evento.UrlInvitacion); + Replace("[URL_DISCUCION]", evento.UrlInvitacion).Replace("[HORA]", StartEvent.ToShortTimeString()); } } } \ No newline at end of file diff -r 8b0c62c255cd -r 15b428ae5931 Agendas/trunk/src/Agendas.Google/DetailsEvents/VanGEventDetail.cs --- a/Agendas/trunk/src/Agendas.Google/DetailsEvents/VanGEventDetail.cs Tue Feb 07 23:28:20 2012 -0300 +++ b/Agendas/trunk/src/Agendas.Google/DetailsEvents/VanGEventDetail.cs Tue Feb 07 23:29:06 2012 -0300 @@ -10,7 +10,7 @@ { private const string TextoVan = "La comunidad ALT.NET Hispano (http://altnethispano.org) realizará [EVENTO_TIPO] sobre [NOMBRE][NOMBRE_EXPOSITOR]." + - "\n\rFecha: [FECHA] a las 18:00 hrs. Hora Internacional (GMT/UTC), con una duración aproximada de 2 horas." + + "\n\rFecha: [FECHA] a las [HORA] hrs. Hora Internacional (GMT/UTC), con una duración aproximada de 2 horas." + "\n\rPueden plantear sus comentarios e inquietudes sobre el tema de la reunión en: [URL_DISCUCION]" + "\n\rPara mayor información sobre cómo atender la reunión consulten: http://tinyurl.com/van-hispano" + "\n\rPueden vincular el Google Calendar al suyo (http://screenr.com/nr7)"; @@ -34,7 +34,8 @@ Replace("[NOMBRE]", evento.Titulo). Replace("[NOMBRE_EXPOSITOR]", GetPonentes(evento)). Replace("[FECHA]", StartEvent.ToString("D", cultureInfo)). - Replace("[URL_DISCUCION]", evento.UrlInvitacion); + Replace("[URL_DISCUCION]", evento.UrlInvitacion). + Replace("[HORA]",evento.FechaInicio.Value.ToShortTimeString()); } private static string GetPonentes(Evento evento)