Merge pull request #4540 from kumpera/android-changes-part1
[mono.git] / mcs / class / System.Data / Test / System.Data.Odbc / OdbcCommandBuilderTest.cs
1 // OdbcCommandBuilderTest.cs - NUnit Test Cases for testing the
2 // OdbcCommandBuilder Test.
3 //
4 // Authors:
5 //      Gert Driesen (drieseng@users.sourceforge.net)
6 // 
7 // Copyright (c) 2008 Gert Driesen
8 //
9 // Permission is hereby granted, free of charge, to any person
10 // obtaining a copy of this software and associated documentation
11 // files (the "Software"), to deal in the Software without
12 // restriction, including without limitation the rights to use, copy,
13 // modify, merge, publish, distribute, sublicense, and/or sell copies
14 // of the Software, and to permit persons to whom the Software is
15 // furnished to do so, subject to the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
24 // BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 // SOFTWARE.
28
29 #if !NO_ODBC
30
31 using System;
32 using System.Data;
33 using System.Data.Common;
34 using System.Data.Odbc;
35
36 using NUnit.Framework;
37
38 namespace MonoTests.System.Data.Odbc
39 {
40         [TestFixture]
41         public class OdbcCommandBuilderTest
42         {
43                 [Test]
44                 public void CatalogLocationTest ()
45                 {
46                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
47                         Assert.AreEqual (CatalogLocation.Start, cb.CatalogLocation, "#1");
48                         cb.CatalogLocation = CatalogLocation.End;
49                         Assert.AreEqual (CatalogLocation.End, cb.CatalogLocation, "#2");
50                 }
51
52                 [Test]
53                 public void CatalogLocation_Value_Invalid ()
54                 {
55                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
56                         cb.CatalogLocation = CatalogLocation.End;
57                         try {
58                                 cb.CatalogLocation = (CatalogLocation) 666;
59                                 Assert.Fail ("#1");
60                         } catch (ArgumentOutOfRangeException ex) {
61                                 // The CatalogLocation enumeration value, 666, is invalid
62                                 Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
63                                 Assert.IsNull (ex.InnerException, "#3");
64                                 Assert.IsNotNull (ex.Message, "#4");
65                                 Assert.IsTrue (ex.Message.IndexOf ("CatalogLocation") != -1, "#5:" + ex.Message);
66                                 Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#6:" + ex.Message);
67                         }
68                         Assert.AreEqual (CatalogLocation.End, cb.CatalogLocation, "#6");
69                 }
70
71                 [Test]
72                 public void CatalogSeparator ()
73                 {
74                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
75                         Assert.AreEqual (".", cb.CatalogSeparator, "#1");
76                         cb.CatalogSeparator = "a";
77                         Assert.AreEqual ("a", cb.CatalogSeparator, "#2");
78                         cb.CatalogSeparator = null;
79                         Assert.AreEqual (".", cb.CatalogSeparator, "#3");
80                         cb.CatalogSeparator = "b";
81                         Assert.AreEqual ("b", cb.CatalogSeparator, "#4");
82                         cb.CatalogSeparator = string.Empty;
83                         Assert.AreEqual (".", cb.CatalogSeparator, "#5");
84                         cb.CatalogSeparator = " ";
85                         Assert.AreEqual (" ", cb.CatalogSeparator, "#6");
86                 }
87
88                 [Test]
89                 public void ConflictOptionTest ()
90                 {
91                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
92                         Assert.AreEqual (ConflictOption.CompareAllSearchableValues, cb.ConflictOption, "#1");
93                         cb.ConflictOption = ConflictOption.CompareRowVersion;
94                         Assert.AreEqual (ConflictOption.CompareRowVersion, cb.ConflictOption, "#2");
95                 }
96
97                 [Test]
98                 public void ConflictOption_Value_Invalid ()
99                 {
100                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
101                         cb.ConflictOption = ConflictOption.CompareRowVersion;
102                         try {
103                                 cb.ConflictOption = (ConflictOption) 666;
104                                 Assert.Fail ("#1");
105                         } catch (ArgumentOutOfRangeException ex) {
106                                 // The ConflictOption enumeration value, 666, is invalid
107                                 Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
108                                 Assert.IsNull (ex.InnerException, "#3");
109                                 Assert.IsNotNull (ex.Message, "#4");
110                                 Assert.IsTrue (ex.Message.IndexOf ("ConflictOption") != -1, "#5:" + ex.Message);
111                                 Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#6:" + ex.Message);
112                                 Assert.AreEqual ("ConflictOption", ex.ParamName, "#7");
113                         }
114                         Assert.AreEqual (ConflictOption.CompareRowVersion, cb.ConflictOption, "#8");
115                 }
116
117                 [Test]
118                 public void QuotePrefix ()
119                 {
120                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
121                         Assert.AreEqual (string.Empty, cb.QuotePrefix, "#1");
122                         cb.QuotePrefix = "mono";
123                         Assert.AreEqual ("mono", cb.QuotePrefix, "#2");
124                         cb.QuotePrefix = null;
125                         Assert.AreEqual (string.Empty, cb.QuotePrefix, "#3");
126                         cb.QuotePrefix = "'\"";
127                         Assert.AreEqual ("'\"", cb.QuotePrefix, "#4");
128                         cb.QuotePrefix = string.Empty;
129                         Assert.AreEqual (string.Empty, cb.QuotePrefix, "#5");
130                         cb.QuotePrefix = " ";
131                         Assert.AreEqual (" ", cb.QuotePrefix, "#6");
132                 }
133
134                 [Test]
135                 public void QuoteSuffix ()
136                 {
137                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
138                         Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#1");
139                         cb.QuoteSuffix = "mono";
140                         Assert.AreEqual ("mono", cb.QuoteSuffix, "#2");
141                         cb.QuoteSuffix = null;
142                         Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#3");
143                         cb.QuoteSuffix = "'\"";
144                         Assert.AreEqual ("'\"", cb.QuoteSuffix, "#4");
145                         cb.QuoteSuffix = string.Empty;
146                         Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#5");
147                         cb.QuoteSuffix = " ";
148                         Assert.AreEqual (" ", cb.QuoteSuffix, "#6");
149                 }
150
151                 [Test] // QuoteIdentifier (String)
152                 public void QuoteIdentifier1 ()
153                 {
154                         OdbcCommandBuilder cb;
155                 
156                         cb = new OdbcCommandBuilder ();
157                         cb.QuotePrefix = "aBc";
158                         Assert.AreEqual ("aBcmoAbCno", cb.QuoteIdentifier ("moAbCno"), "#A1");
159                         Assert.AreEqual ("aBc", cb.QuoteIdentifier (string.Empty), "#A2");
160                         Assert.AreEqual ("aBcZ", cb.QuoteIdentifier ("Z"), "#A3");
161                         Assert.AreEqual ("aBcabc", cb.QuoteIdentifier ("abc"), "#A4");
162                         cb.QuoteSuffix = "deF";
163                         Assert.AreEqual ("aBcmodEfnodeF", cb.QuoteIdentifier ("modEfno"), "#A5");
164                         Assert.AreEqual ("aBcdeF", cb.QuoteIdentifier (string.Empty), "#A6");
165                         Assert.AreEqual ("aBcZdeF", cb.QuoteIdentifier ("Z"), "#A7");
166                         Assert.AreEqual ("aBcabcdeF", cb.QuoteIdentifier ("abc"), "#A8");
167
168                         cb = new OdbcCommandBuilder ();
169                         cb.QuotePrefix = "X";
170                         Assert.AreEqual ("XmoXno", cb.QuoteIdentifier ("moXno"), "#B1");
171                         Assert.AreEqual ("X", cb.QuoteIdentifier (string.Empty), "#B2");
172                         Assert.AreEqual ("XZ", cb.QuoteIdentifier ("Z"), "#B3");
173                         Assert.AreEqual ("XX", cb.QuoteIdentifier ("X"), "#B4");
174                         cb.QuoteSuffix = " ";
175                         Assert.AreEqual ("Xmo  no ", cb.QuoteIdentifier ("mo no"), "#B5");
176                         Assert.AreEqual ("X ", cb.QuoteIdentifier (string.Empty), "#B6");
177                         Assert.AreEqual ("XZ ", cb.QuoteIdentifier ("Z"), "#B7");
178                         Assert.AreEqual ("X   ", cb.QuoteIdentifier (" "), "#B8");
179
180                         cb = new OdbcCommandBuilder ();
181                         cb.QuotePrefix = " ";
182                         Assert.AreEqual ("mono", cb.QuoteIdentifier ("mono"), "#C1");
183                         Assert.AreEqual (string.Empty, cb.QuoteIdentifier (string.Empty), "#C2");
184                         Assert.AreEqual ("Z", cb.QuoteIdentifier ("Z"), "#C3");
185                         cb.QuoteSuffix = "dEf";
186                         Assert.AreEqual ("modefno", cb.QuoteIdentifier ("modefno"), "#C4");
187                         Assert.AreEqual (string.Empty, cb.QuoteIdentifier (string.Empty), "#C5");
188                         Assert.AreEqual ("Z", cb.QuoteIdentifier ("Z"), "#C6");
189
190                         cb = new OdbcCommandBuilder ();
191                         cb.QuotePrefix = "  ";
192                         Assert.AreEqual ("  mono", cb.QuoteIdentifier ("mono"), "#D1");
193                         Assert.AreEqual ("  ", cb.QuoteIdentifier (string.Empty), "#D2");
194                         Assert.AreEqual ("  Z", cb.QuoteIdentifier ("Z"), "#D3");
195                         cb.QuoteSuffix = "dEf";
196                         Assert.AreEqual ("  moDeFnodEf", cb.QuoteIdentifier ("moDeFno"), "#D4");
197                         Assert.AreEqual ("  modEfdEfnodEf", cb.QuoteIdentifier ("modEfno"), "#D5");
198                         Assert.AreEqual ("  dEf", cb.QuoteIdentifier (string.Empty), "#D6");
199                         Assert.AreEqual ("  ZdEf", cb.QuoteIdentifier ("Z"), "#D7");
200                 }
201
202                 [Test] // QuoteIdentifier (String)
203                 public void QuoteIdentifier1_QuotePrefix_Empty ()
204                 {
205                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
206                         try {
207                                 cb.QuoteIdentifier ("mono");
208                                 Assert.Fail ("#1");
209                         } catch (InvalidOperationException ex) {
210                                 // QuoteIdentifier requires open connection when
211                                 // the quote prefix has not been set
212                                 Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2");
213                                 Assert.IsNull (ex.InnerException, "#3");
214                                 Assert.IsNotNull (ex.Message, "#4");
215                         }
216                 }
217
218                 [Test] // QuoteIdentifier (String)
219                 public void QuoteIdentifier1_UnquotedIdentifier_Null ()
220                 {
221                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
222                         try {
223                                 cb.QuoteIdentifier ((string) null);
224                                 Assert.Fail ("#1");
225                         } catch (ArgumentNullException ex) {
226                                 Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
227                                 Assert.IsNull (ex.InnerException, "#3");
228                                 Assert.IsNotNull (ex.Message, "#4");
229                                 Assert.AreEqual ("unquotedIdentifier", ex.ParamName, "#5");
230                         }
231                 }
232
233                 [Test] // QuoteIdentifier (String, OdbcConnection)
234                 public void QuoteIdentifier2_Connection_Null ()
235                 {
236                         OdbcCommandBuilder cb;
237                         OdbcConnection conn = null;
238
239                         cb = new OdbcCommandBuilder ();
240                         try {
241                                 cb.QuoteIdentifier ("mono", conn);
242                                 Assert.Fail ("#A1");
243                         } catch (InvalidOperationException ex) {
244                                 // QuoteIdentifier requires open connection when
245                                 // the quote prefix has not been set
246                                 Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A2");
247                                 Assert.IsNull (ex.InnerException, "#A3");
248                                 Assert.IsNotNull (ex.Message, "#A4");
249                         }
250
251                         cb = new OdbcCommandBuilder ();
252                         cb.QuotePrefix = "abc";
253                         Assert.AreEqual ("abcmono", cb.QuoteIdentifier ("mono", conn), "#B1");
254                         Assert.AreEqual ("abcZ", cb.QuoteIdentifier ("Z", conn), "#B2");
255                         Assert.AreEqual ("abcabc", cb.QuoteIdentifier ("abc", conn), "#B3");
256                         Assert.AreEqual ("abc", cb.QuoteIdentifier (string.Empty, conn), "#B4");
257                         Assert.AreEqual ("abc ", cb.QuoteIdentifier (" ", conn), "#B5");
258                         Assert.AreEqual ("abc\r", cb.QuoteIdentifier ("\r", conn), "#B6");
259                         cb.QuoteSuffix = "def";
260                         Assert.AreEqual ("abcmonodef", cb.QuoteIdentifier ("mono", conn), "#B7");
261                         Assert.AreEqual ("abcZdef", cb.QuoteIdentifier ("Z", conn), "#B8");
262                         Assert.AreEqual ("abcabcdef", cb.QuoteIdentifier ("abc", conn), "#B9");
263                         Assert.AreEqual ("abcdef", cb.QuoteIdentifier (string.Empty, conn), "#B10");
264                         Assert.AreEqual ("abc def", cb.QuoteIdentifier (" ", conn), "#B11");
265                         Assert.AreEqual ("abc\rdef", cb.QuoteIdentifier ("\r", conn), "#B12");
266
267                         cb.QuotePrefix = string.Empty;
268                         try {
269                                 cb.QuoteIdentifier ("mono", conn);
270                                 Assert.Fail ("#C1");
271                         } catch (InvalidOperationException ex) {
272                                 // QuoteIdentifier requires open connection when
273                                 // the quote prefix has not been set
274                                 Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
275                                 Assert.IsNull (ex.InnerException, "#C3");
276                                 Assert.IsNotNull (ex.Message, "#C4");
277                         }
278
279                         cb = new OdbcCommandBuilder ();
280                         cb.QuotePrefix = "X";
281                         Assert.AreEqual ("Xmono", cb.QuoteIdentifier ("mono", conn), "#D1");
282                         Assert.AreEqual ("XZ", cb.QuoteIdentifier ("Z", conn), "#D2");
283                         Assert.AreEqual ("XX", cb.QuoteIdentifier ("X", conn), "#D3");
284                         Assert.AreEqual ("X", cb.QuoteIdentifier (string.Empty, conn), "#D4");
285                         Assert.AreEqual ("X ", cb.QuoteIdentifier (" ", conn), "#D5");
286                         Assert.AreEqual ("X\r", cb.QuoteIdentifier ("\r", conn), "#D6");
287                         cb.QuoteSuffix = " ";
288                         Assert.AreEqual ("Xmono ", cb.QuoteIdentifier ("mono", conn), "#D7");
289                         Assert.AreEqual ("XZ ", cb.QuoteIdentifier ("Z", conn), "#D8");
290                         Assert.AreEqual ("XX ", cb.QuoteIdentifier ("X", conn), "#D9");
291                         Assert.AreEqual ("X ", cb.QuoteIdentifier (string.Empty, conn), "#D10");
292                         Assert.AreEqual ("X   ", cb.QuoteIdentifier (" ", conn), "#D11");
293                         Assert.AreEqual ("X\r ", cb.QuoteIdentifier ("\r", conn), "#D12");
294
295                         cb = new OdbcCommandBuilder ();
296                         cb.QuotePrefix = " ";
297                         Assert.AreEqual ("mono", cb.QuoteIdentifier ("mono", conn), "#E1");
298                         Assert.AreEqual ("Z", cb.QuoteIdentifier ("Z", conn), "#E2");
299                         Assert.AreEqual ("abc", cb.QuoteIdentifier ("abc", conn), "#E3");
300                         Assert.AreEqual (string.Empty, cb.QuoteIdentifier (string.Empty, conn), "#E4");
301                         Assert.AreEqual (" ", cb.QuoteIdentifier (" ", conn), "#E5");
302                         Assert.AreEqual ("\r", cb.QuoteIdentifier ("\r", conn), "#E6");
303                         cb.QuoteSuffix = "def";
304                         Assert.AreEqual ("mono", cb.QuoteIdentifier ("mono", conn), "#E7");
305                         Assert.AreEqual ("Z", cb.QuoteIdentifier ("Z", conn), "#E8");
306                         Assert.AreEqual ("abc", cb.QuoteIdentifier ("abc", conn), "#E9");
307                         Assert.AreEqual (string.Empty, cb.QuoteIdentifier (string.Empty, conn), "#E10");
308                         Assert.AreEqual (" ", cb.QuoteIdentifier (" ", conn), "#E11");
309                         Assert.AreEqual ("\r", cb.QuoteIdentifier ("\r", conn), "#E12");
310                 }
311
312                 [Test] // QuoteIdentifier (String, OdbcConnection)
313                 public void QuoteIdentifier2_Connection_Closed ()
314                 {
315                         OdbcCommandBuilder cb;
316                         OdbcConnection conn = new OdbcConnection ();
317
318                         cb = new OdbcCommandBuilder ();
319                         try {
320                                 cb.QuoteIdentifier ("mono", conn);
321                                 Assert.Fail ("#A1");
322                         } catch (InvalidOperationException ex) {
323                                 // QuoteIdentifier requires an open and available
324                                 // Connection. The connection's current state is
325                                 // closed
326                                 Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A2");
327                                 Assert.IsNull (ex.InnerException, "#A3");
328                                 Assert.IsNotNull (ex.Message, "#A4");
329                         }
330
331                         cb = new OdbcCommandBuilder ();
332                         cb.QuotePrefix = "abc";
333                         Assert.AreEqual ("abcmono", cb.QuoteIdentifier ("mono", conn), "#B1");
334                         Assert.AreEqual ("abcZ", cb.QuoteIdentifier ("Z", conn), "#B2");
335                         Assert.AreEqual ("abcabc", cb.QuoteIdentifier ("abc", conn), "#B3");
336                         Assert.AreEqual ("abc", cb.QuoteIdentifier (string.Empty, conn), "#B4");
337                         Assert.AreEqual ("abc ", cb.QuoteIdentifier (" ", conn), "#B5");
338                         Assert.AreEqual ("abc\r", cb.QuoteIdentifier ("\r", conn), "#B6");
339                         cb.QuoteSuffix = "def";
340                         Assert.AreEqual ("abcmonodef", cb.QuoteIdentifier ("mono", conn), "#B7");
341                         Assert.AreEqual ("abcZdef", cb.QuoteIdentifier ("Z", conn), "#B8");
342                         Assert.AreEqual ("abcabcdef", cb.QuoteIdentifier ("abc", conn), "#B9");
343                         Assert.AreEqual ("abcdef", cb.QuoteIdentifier (string.Empty, conn), "#B10");
344                         Assert.AreEqual ("abc def", cb.QuoteIdentifier (" ", conn), "#B11");
345                         Assert.AreEqual ("abc\rdef", cb.QuoteIdentifier ("\r", conn), "#B12");
346
347                         cb.QuotePrefix = string.Empty;
348                         try {
349                                 cb.QuoteIdentifier ("mono");
350                                 Assert.Fail ("#C1");
351                         } catch (InvalidOperationException ex) {
352                                 // QuoteIdentifier requires an open and available
353                                 // Connection. The connection's current state is
354                                 // closed
355                                 Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
356                                 Assert.IsNull (ex.InnerException, "#C3");
357                                 Assert.IsNotNull (ex.Message, "#C4");
358                         }
359
360                         cb = new OdbcCommandBuilder ();
361                         cb.QuotePrefix = "X";
362                         Assert.AreEqual ("Xmono", cb.QuoteIdentifier ("mono"), "#D1");
363                         Assert.AreEqual ("XZ", cb.QuoteIdentifier ("Z"), "#D2");
364                         Assert.AreEqual ("XX", cb.QuoteIdentifier ("X"), "#D3");
365                         Assert.AreEqual ("X", cb.QuoteIdentifier (string.Empty, conn), "#D4");
366                         Assert.AreEqual ("X ", cb.QuoteIdentifier (" ", conn), "#D5");
367                         Assert.AreEqual ("X\r", cb.QuoteIdentifier ("\r", conn), "#D6");
368                         cb.QuoteSuffix = " ";
369                         Assert.AreEqual ("Xmono ", cb.QuoteIdentifier ("mono"), "#D7");
370                         Assert.AreEqual ("XZ ", cb.QuoteIdentifier ("Z"), "#D8");
371                         Assert.AreEqual ("XX ", cb.QuoteIdentifier ("X"), "#D9");
372                         Assert.AreEqual ("X ", cb.QuoteIdentifier (string.Empty, conn), "#D10");
373                         Assert.AreEqual ("X   ", cb.QuoteIdentifier (" ", conn), "#D11");
374                         Assert.AreEqual ("X\r ", cb.QuoteIdentifier ("\r", conn), "#D12");
375
376                         cb = new OdbcCommandBuilder ();
377                         cb.QuotePrefix = " ";
378                         Assert.AreEqual ("mono", cb.QuoteIdentifier ("mono", conn), "#E1");
379                         Assert.AreEqual ("Z", cb.QuoteIdentifier ("Z", conn), "#E2");
380                         Assert.AreEqual ("abc", cb.QuoteIdentifier ("abc", conn), "#E3");
381                         Assert.AreEqual (string.Empty, cb.QuoteIdentifier (string.Empty, conn), "#E4");
382                         Assert.AreEqual (" ", cb.QuoteIdentifier (" ", conn), "#E5");
383                         Assert.AreEqual ("\r", cb.QuoteIdentifier ("\r", conn), "#E6");
384                         cb.QuoteSuffix = "def";
385                         Assert.AreEqual ("mono", cb.QuoteIdentifier ("mono", conn), "#E7");
386                         Assert.AreEqual ("Z", cb.QuoteIdentifier ("Z", conn), "#E8");
387                         Assert.AreEqual ("abc", cb.QuoteIdentifier ("abc", conn), "#E9");
388                         Assert.AreEqual (string.Empty, cb.QuoteIdentifier (string.Empty, conn), "#E10");
389                         Assert.AreEqual (" ", cb.QuoteIdentifier (" ", conn), "#E11");
390                         Assert.AreEqual ("\r", cb.QuoteIdentifier ("\r", conn), "#E12");
391                 }
392
393                 [Test]
394                 public void SchemaSeparator ()
395                 {
396                         OdbcCommandBuilder cb = new OdbcCommandBuilder ();
397                         Assert.AreEqual (".", cb.SchemaSeparator, "#1");
398                         cb.SchemaSeparator = "a";
399                         Assert.AreEqual ("a", cb.SchemaSeparator, "#2");
400                         cb.SchemaSeparator = null;
401                         Assert.AreEqual (".", cb.SchemaSeparator, "#3");
402                         cb.SchemaSeparator = "b";
403                         Assert.AreEqual ("b", cb.SchemaSeparator, "#4");
404                         cb.SchemaSeparator = string.Empty;
405                         Assert.AreEqual (".", cb.SchemaSeparator, "#5");
406                         cb.SchemaSeparator = " ";
407                         Assert.AreEqual (" ", cb.SchemaSeparator, "#6");
408                 }
409         }
410 }
411
412 #endif