* src/**/*: Flush; syncs to DbLinq r1053. Adds
[mono.git] / mcs / class / System.Data.Linq / src / DbLinq / Test / DataContextTest.cs
index dbc8e1e91ac599af39da4af3c94a0629048de68a..d5cbb2b8cb55ae8aba15e538023e140f4c30d4ac 100755 (executable)
@@ -107,6 +107,12 @@ namespace DbLinqTest {
             new DataContext("DbLinqConnectionType=");\r
         }\r
 \r
+        [Test, ExpectedException(typeof(ArgumentException))]\r
+        public void Ctor_ConnectionString_DbLinqConnectionType_Empty2()\r
+        {\r
+            new DataContext("DbLinqConnectionType=;");\r
+        }\r
+\r
         [Test, ExpectedException(typeof(ArgumentException))]\r
         public void Ctor_ConnectionString_DbLinqConnectionType_Invalid()\r
         {\r
@@ -125,6 +131,40 @@ namespace DbLinqTest {
             new DataContext("DbLinqProvider=DbLinq.Sqlite.dll");\r
         }\r
 \r
+        [Test, ExpectedException(typeof(ArgumentNullException))]\r
+        public void Ctor_FileOrServerOrConnectionIsNull()\r
+        {\r
+            MappingSource mapping = new AttributeMappingSource();\r
+            string fileOrServerOrConnection = null;\r
+            new DataContext(fileOrServerOrConnection, mapping);\r
+        }\r
+\r
+        [Test, ExpectedException(typeof(ArgumentNullException))]\r
+        public void Ctor_MappingIsNull()\r
+        {\r
+            MappingSource mapping = null;\r
+            string fileOrServerOrConnection = null;\r
+            new DataContext("", mapping);\r
+        }\r
+\r
+#if !MONO_STRICT\r
+        [Test, ExpectedException(typeof(NotImplementedException))]\r
+        public void Ctor_FileOrServerOrConnectionIsFilename()\r
+        {\r
+            MappingSource mapping = new AttributeMappingSource();\r
+            string fileOrServerOrConnection = typeof(DataContextTest).Assembly.Location;\r
+            new DataContext(fileOrServerOrConnection, mapping);\r
+        }\r
+\r
+        [Test, ExpectedException(typeof(NotImplementedException))]\r
+        public void Ctor_FileOrServerOrConnectionIsServer()\r
+        {\r
+            MappingSource mapping = new AttributeMappingSource();\r
+            string fileOrServerOrConnection = "ThisIsAssumedToBeAServerName";\r
+            new DataContext(fileOrServerOrConnection, mapping);\r
+        }\r
+#endif\r
+\r
         [Test]\r
         public void Connection()\r
         {\r