diff Agendas/trunk/src/Agendas.Google.Test/GUrlShortenerTest.cs @ 232:806fd94727ce

Validación de parámetros en GUrlShortener
author juanjose.montesdeocaarbos
date Mon, 03 Oct 2011 07:50:54 -0300
parents 03c237cd5cc4
children
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Google.Test/GUrlShortenerTest.cs	Mon Sep 26 09:29:59 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Google.Test/GUrlShortenerTest.cs	Mon Oct 03 07:50:54 2011 -0300
@@ -38,5 +38,14 @@
 			Assert.AreEqual(new Uri("http://altnethispano.org/Inicio.aspx"), response.ResponseUri);
 
 		}
-	}
+
+        [Test]
+        public void Parametros_Invalidos_En_GetShortUrl()
+        {
+            var gUrlShortener = new GUrlShortenerAdapter();
+
+            Assert.Throws<ArgumentException>(() => gUrlShortener.GetShortUrl(string.Empty));
+            Assert.Throws<ArgumentNullException>(() => gUrlShortener.GetShortUrl(null));
+        }
+    }
 }