Clean up Pester tests

This commit is contained in:
Kevin Marquette
2018-12-28 15:01:15 -08:00
parent 2eae9f2bb2
commit e5a0147d71
11 changed files with 312 additions and 164 deletions

View File

@@ -0,0 +1,16 @@
InModuleScope Chronometer {
Describe "Class: MonitoredScript" -Tag Build {
It "Creates an object" {
{[MonitoredScript]::New()} | Should Not Throw
}
It "SetScript()" {
$monitor = [MonitoredScript]::New()
{$monitor.SetScript("$PSScriptRoot\..\..\scratchfiles\example.ps1")} | Should Not Throw
}
}
}

View File

@@ -0,0 +1,16 @@
InModuleScope Chronometer {
Describe "Class: ScriptLine" -Tag Build {
It "Creates an Object" {
{[ScriptLine]::New()} | Should Not Throw
}
It "ToString()" {
{[ScriptLine]::New().toString()} | Should Not Throw
}
It "Creates an Object" {
{[ScriptLine]::New().AddExecutionTime(1)} | Should Not Throw
}
}
}

View File

@@ -0,0 +1,13 @@
InModuleScope Chronometer {
Describe "Class: ScriptProfiler" -Tag Build {
It "Creates an Object" {
{[ScriptProfiler]::New()} | Should Not Throw
}
It "Start()" {
{[ScriptProfiler]::Start()} | Should Not Throw
}
}
}