view Agendas/trunk/src/Agendas.Tests/DateTimeFormattingTests.cs @ 254:478656b70afb

Tag deploy 2011-10-07 v1.0.3 para conjunto de cambios 7cf64cd790ab añadido
author Administrador@DESA-WIN-002.cpe.telecentro.net.ar
date Mon, 17 Oct 2011 07:41:32 -0300
parents ebce59b45b50
children
line wrap: on
line source

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace AltNetHispano.Agendas.Tests
{
  [TestFixture]
  public class DateTimeFormattingTests
  {
    [Test]
    public void la_fecha_debe_formatearse_en_castellano()
    {
      var fecha = new DateTime(2010, 11, 20, 18, 0, 0);
      Assert.AreEqual("sábado, 20 de noviembre de 2010", fecha.ToString("D", CultureInfo.CreateSpecificCulture("es-ES")));
    }

    [Test]
    public void la_hora_debe_expresarse_en_24hs()
    {
      var fecha = new DateTime(2010, 11, 20, 18, 0, 0);
      Assert.AreEqual("18:00", fecha.ToString("t", CultureInfo.CreateSpecificCulture("es-ES")));
    }
  }

}