Mercurial > pub > bltoolkit
comparison HowTo/Data/OpenConfig1.cs @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f990fcb411a9 |
---|---|
1 using System; | |
2 using System.Data; | |
3 | |
4 using NUnit.Framework; | |
5 | |
6 using BLToolkit.Data; | |
7 | |
8 namespace HowTo.Data | |
9 { | |
10 [TestFixture] | |
11 public class OpenConfig1 | |
12 { | |
13 [Test] | |
14 public void DefaultConfiguration() | |
15 { | |
16 // Default configuration and default data provider. | |
17 // | |
18 using (DbManager db = new DbManager/*[a]*/()/*[/a]*/) | |
19 { | |
20 Assert.AreEqual(ConnectionState.Open, db.Connection.State); | |
21 } | |
22 } | |
23 | |
24 [Test] | |
25 public void DevelopmentConfiguration() | |
26 { | |
27 // Development configuration and default data provider. | |
28 // | |
29 using (DbManager db = new DbManager(/*[a]*/"Development"/*[/a]*/)) | |
30 { | |
31 Assert.AreEqual(ConnectionState.Open, db.Connection.State); | |
32 } | |
33 } | |
34 | |
35 [Test] | |
36 public void ProductionConfiguration() | |
37 { | |
38 // Production configuration and default data provider. | |
39 // | |
40 using (DbManager db = new DbManager(/*[a]*/"Production"/*[/a]*/)) | |
41 { | |
42 Assert.AreEqual(ConnectionState.Open, db.Connection.State); | |
43 } | |
44 } | |
45 | |
46 [Test] | |
47 public void OleDbDefaultConfiguration() | |
48 { | |
49 // Default configuration and OleDb data provider. | |
50 // | |
51 using (DbManager db = new DbManager(/*[a]*/"OleDb"/*[/a]*/)) | |
52 { | |
53 Assert.AreEqual(ConnectionState.Open, db.Connection.State); | |
54 } | |
55 } | |
56 | |
57 [Test] | |
58 public void OleDbDevelopmentConfiguration() | |
59 { | |
60 // Development configuration and OleDb data provider. | |
61 // | |
62 using (DbManager db = new DbManager(/*[a]*/"OleDb"/*[/a]*/, /*[a]*/"Development"/*[/a]*/)) | |
63 { | |
64 Assert.AreEqual(ConnectionState.Open, db.Connection.State); | |
65 } | |
66 } | |
67 | |
68 [Test] | |
69 public void OleDbProductionConfiguration() | |
70 { | |
71 // Production configuration and OleDb data provider. | |
72 // | |
73 using (DbManager db = new DbManager(/*[a]*/"OleDb"/*[/a]*/, /*[a]*/"Production"/*[/a]*/)) | |
74 { | |
75 Assert.AreEqual(ConnectionState.Open, db.Connection.State); | |
76 } | |
77 } | |
78 } | |
79 } |