Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Tests/PublicadoresConfigTests.cs @ 128:1e47bf408073
Asignacion de los publicadores configurados en web.config al factory de agenda
(mediante CompositePublicador)
author | jorge.rowies |
---|---|
date | Mon, 04 Jul 2011 20:00:51 -0300 |
parents | 3700b77ed455 |
children |
line wrap: on
line source
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using AltNetHispano.Agendas.Web; using NUnit.Framework; namespace AltNetHispano.Agendas.Tests { [TestFixture] public class PublicadoresConfigTests { [Test] public void TestConfig() { var cfg = ConfigurationManager.GetSection("publicadoresSection") as PublicadorConfigurationSection; Assert.IsNotNull(cfg); Assert.AreEqual(2, cfg.Publicadores.Count); Assert.AreEqual("publicador.blog", cfg.Publicadores["Blog"].ComponentKey); Assert.AreEqual(false, cfg.Publicadores["Blog"].Enabled); Assert.AreEqual("publicador.twitter", cfg.Publicadores["Twitter"].ComponentKey); Assert.AreEqual(true, cfg.Publicadores["Twitter"].Enabled); } } }