This repository was archived by the owner on May 30, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ $here = Split-Path - Parent $MyInvocation.MyCommand.Path
2+ $toplevel = Split-Path - Parent $here
3+ $sut = (Split-Path - Leaf $MyInvocation.MyCommand.Path ).Replace(" .Tests." , " ." )
4+
5+ . " $here \$sut "
6+
7+ Describe " Importing of XML Configuration File" {
8+ Context " Loading a Configuration File" {
9+ $Config = Import-XMLConfig - ConfigPath " $toplevel /StatsToGraphiteConfig.xml"
10+
11+ It " Loaded Configuration File Should Not Be Empty" {
12+ $Config | Should Not BeNullOrEmpty
13+ }
14+ It " Should Have 15 Properties" {
15+ $Config.Count | Should Be 15
16+ }
17+ It " SendUsingUDP should be Boolean" {
18+ $Config.SendUsingUDP -is [Boolean ] | Should Be $true
19+ }
20+ It " MSSQLMetricSendIntervalSeconds should be Int32" {
21+ $Config.MSSQLMetricSendIntervalSeconds -is [Int32 ] | Should Be $true
22+ }
23+ It " MSSQLConnectTimeout should be Int32" {
24+ $Config.MSSQLConnectTimeout -is [Int32 ] | Should Be $true
25+ }
26+ It " MSSQLQueryTimeout should be Int32" {
27+ $Config.MSSQLQueryTimeout -is [Int32 ] | Should Be $true
28+ }
29+ It " MetricSendIntervalSeconds should be Int32" {
30+ $Config.MetricSendIntervalSeconds -is [Int32 ] | Should Be $true
31+ }
32+ It " MetricTimeSpan should be TimeSpan" {
33+ $Config.MetricTimeSpan -is [TimeSpan ] | Should Be $true
34+ }
35+ It " MSSQLMetricTimeSpan should be TimeSpan" {
36+ $Config.MSSQLMetricTimeSpan -is [TimeSpan ] | Should Be $true
37+ }
38+ }
39+ }
You can’t perform that action at this time.
0 commit comments