File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,26 @@ Describe 'Get-SqlDscStartupParameter' -Tag 'Public' {
251251 Should - Invoke - CommandName Get-SqlDscManagedComputerService - Exactly - Times 0 - Scope It
252252 }
253253 }
254+
255+ Context ' When passing a service object via pipeline' {
256+ It ' Should accept ServiceObject from pipeline and return correct results' {
257+ $result = $mockServiceObject | Get-SqlDscStartupParameter
258+
259+ Should - ActualValue $result - BeOfType (InModuleScope - ScriptBlock { [StartupParameters ] })
260+
261+ Should - ActualValue $result.TraceFlag - BeOfType ' System.UInt32[]'
262+ Should - ActualValue $result.DataFilePath - BeOfType ' System.String[]'
263+ Should - ActualValue $result.LogFilePath - BeOfType ' System.String[]'
264+ Should - ActualValue $result.ErrorLogPath - BeOfType ' System.String[]'
265+
266+ $result.DataFilePath | Should - Be ' C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\DATA\master.mdf'
267+ $result.LogFilePath | Should - Be ' C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\DATA\log.ldf'
268+ $result.ErrorLogPath | Should - Be ' C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\Log\ERRORLOG'
269+ $result.TraceFlag | Should - BeNullOrEmpty
270+
271+ Should - Invoke - CommandName Get-SqlDscManagedComputerService - Exactly - Times 0 - Scope It
272+ }
273+ }
254274 }
255275
256276 Context ' When one trace flag exist' {
You can’t perform that action at this time.
0 commit comments