Definition at line 23 of file DbConfigTests.cs.
Enumerator |
---|
One |
|
Two |
|
Default |
|
Definition at line 131 of file DbConfigTests.cs.
No specific form of the parameter was given: this default to the system default parameter style confi...
void Deveel.Data.Configuration.DbConfigTests.DefaultConfig |
( |
| ) |
|
|
inline |
Definition at line 25 of file DbConfigTests.cs.
26 IConfiguration config = null;
27 Assert.DoesNotThrow(() => config =
new Configuration());
28 Assert.IsNotNull(config);
29 Assert.IsNull(config.Parent);
30 Assert.IsNull(config.Source);
void Deveel.Data.Configuration.DbConfigTests.Extensions_LoadFromProperties |
( |
| ) |
|
|
inline |
Definition at line 138 of file DbConfigTests.cs.
139 var properties =
new StringBuilder();
140 properties.AppendLine(
"system.readOnly = false");
141 properties.AppendLine(
"caching.type = Memory");
143 IConfiguration configuration = null;
144 Assert.DoesNotThrow(() => configuration =
new Configuration(
new StringConfigSource(properties.ToString())));
145 Assert.IsNotNull(configuration);
146 Assert.DoesNotThrow(() => configuration.Load(
new PropertiesConfigFormatter()));
148 Assert.DoesNotThrow(() => Assert.IsNotNull(configuration.GetValue(
"system.readOnly")));
150 bool readOnly =
true;
151 Assert.DoesNotThrow(() => readOnly = configuration.GetBoolean(
"system.readOnly"));
152 Assert.IsFalse(readOnly);
void Deveel.Data.Configuration.DbConfigTests.GetBooleanValue |
( |
string |
key, |
|
|
string |
value, |
|
|
bool |
expected |
|
) |
| |
|
inline |
Definition at line 100 of file DbConfigTests.cs.
101 IConfiguration config = null;
102 Assert.DoesNotThrow(() => config =
new Configuration());
103 Assert.IsNotNull(config);
105 Assert.DoesNotThrow(() => config.SetValue(key, value));
107 object configValue = null;
108 Assert.DoesNotThrow(() => configValue = config.GetBoolean(key));
109 Assert.IsNotNull(configValue);
110 Assert.IsInstanceOf<
bool>(configValue);
111 Assert.AreEqual(expected, configValue);
void Deveel.Data.Configuration.DbConfigTests.GetEnumValue |
( |
object |
value, |
|
|
TestEnum |
expected |
|
) |
| |
|
inline |
Definition at line 118 of file DbConfigTests.cs.
119 IConfiguration config = null;
120 Assert.DoesNotThrow(() => config =
new Configuration());
121 Assert.IsNotNull(config);
123 Assert.DoesNotThrow(() => config.SetValue(
"test", value));
125 object configValue = null;
126 Assert.DoesNotThrow(() => configValue = config.GetValue<
TestEnum>(
"test"));
127 Assert.IsInstanceOf<
TestEnum>(configValue);
128 Assert.AreEqual(expected, configValue);
void Deveel.Data.Configuration.DbConfigTests.GetValueAsInt32 |
( |
| ) |
|
|
inline |
Definition at line 81 of file DbConfigTests.cs.
82 IConfiguration config = null;
83 Assert.DoesNotThrow(() => config =
new Configuration());
84 Assert.IsNotNull(config);
86 Assert.DoesNotThrow(() => config.SetValue(
"test.oneKey",
"22"));
89 Assert.DoesNotThrow(() => value = config.GetInt32(
"test.oneKey"));
90 Assert.IsNotNull(value);
91 Assert.IsInstanceOf<
int>(value);
92 Assert.AreEqual(22, value);
void Deveel.Data.Configuration.DbConfigTests.GetValuesFromChild |
( |
| ) |
|
|
inline |
Definition at line 54 of file DbConfigTests.cs.
55 IConfiguration config = null;
56 Assert.DoesNotThrow(() => config =
new Configuration());
57 Assert.IsNotNull(config);
59 Assert.DoesNotThrow(() => config.SetValue(
"test.oneKey",
"one"));
61 IConfiguration child = null;
62 Assert.DoesNotThrow(() => child =
new Configuration(config));
63 Assert.IsNotNull(child);
64 Assert.IsNotNull(child.Parent);
66 Assert.DoesNotThrow(() => child.SetValue(
"test.oneKey", 45));
69 Assert.DoesNotThrow(() => value = child.GetValue(
"test.oneKey"));
70 Assert.IsNotNull(value);
71 Assert.IsInstanceOf<
int>(value);
72 Assert.AreEqual(45, value);
74 Assert.DoesNotThrow(() => value = config.GetValue(
"test.oneKey"));
75 Assert.IsNotNull(value);
76 Assert.IsInstanceOf<
string>(value);
77 Assert.AreEqual(
"one", value);
void Deveel.Data.Configuration.DbConfigTests.GetValuesFromRoot |
( |
| ) |
|
|
inline |
Definition at line 34 of file DbConfigTests.cs.
35 IConfiguration config = null;
36 Assert.DoesNotThrow(() => config =
new Configuration());
37 Assert.IsNotNull(config);
38 Assert.DoesNotThrow(() => config.SetValue(
"test.oneKey", 54));
39 Assert.DoesNotThrow(() => config.SetValue(
"test.twoKeys", null));
44 Assert.DoesNotThrow(() => value1 = config.GetValue(
"test.oneKey"));
45 Assert.IsNotNull(value1);
46 Assert.IsInstanceOf<
int>(value1);
47 Assert.AreEqual(54, value1);
49 Assert.DoesNotThrow(() => value2 = config.GetValue(
"test.twoKeys"));
50 Assert.IsNull(value2);
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-nunit/Deveel.Data.Configuration/DbConfigTests.cs