Exemple #1
0
 public void TestNotValidDate
 (
     [Values("hasdgjashd", "", null, "2/2/76")] string x,
     [Values("aaaa-mm-dd", "DD-MM-YYYY")] string y,
     [Values(null, null, null)] string z
 )
 {
     Assert.AreEqual(z, DateFormat.ChangeFormat(x, y));
 }
Exemple #2
0
 public void TestFormat
 (
     [Values("02/12/1988", "02/12/1944")] string x,
     [Values("aaaa-mm-dd", "DD-MM-YYYY")] string y,
     [Values("1988-12-02", "02-12-1944")] string z
 )
 {
     Assert.AreEqual(z, DateFormat.ChangeFormat(x, y));
 }
Exemple #3
0
 public void TestNotValidFormat
 (
     [Values("02/01/1988", "02/05/1944", "03/10/1967")] string x,
     [Values("ffff-yy", "", null)] string y,
     [Values(null, null, null)] string z
 )
 {
     Assert.AreEqual(z, DateFormat.ChangeFormat(x, y));
 }
Exemple #4
0
        static void Main(string[] args)
        {
            string testDate = "10/11/1977";

            Console.WriteLine("{0} se convierte a: {1} ", testDate, DateFormat.ChangeFormat(testDate, "aaaa-mm-dd"));
        }