Add Test-MqttConnection and Show-MqttExamples cmdlets, update documentation

Co-authored-by: chkr1011 <6939810+chkr1011@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-07 10:50:42 +00:00
co-authored by chkr1011
parent 07b72e75ed
commit 16f8765562
4 changed files with 149 additions and 1 deletions
+9 -1
View File
@@ -1,5 +1,5 @@
# Quick smoke test for MQTTnet PowerShell Module
Import-Module ./bin/Debug/net8.0/MQTTnet.PowerShell.dll
Import-Module ./bin/Debug/net8.0/MQTTnet.PowerShell.dll -WarningAction SilentlyContinue
Write-Host "Testing module load..." -ForegroundColor Yellow
$commands = Get-Command -Module MQTTnet.PowerShell
@@ -10,6 +10,14 @@ Write-Host "`nTesting session creation..." -ForegroundColor Yellow
$session = New-MqttSession
Write-Host "Session created successfully!" -ForegroundColor Green
Write-Host "`nTesting Show-MqttExamples..." -ForegroundColor Yellow
$examples = Show-MqttExamples
if ($examples) {
Write-Host "Examples retrieved successfully!" -ForegroundColor Green
} else {
Write-Host "Failed to retrieve examples!" -ForegroundColor Red
}
Write-Host "`nTesting session cleanup..." -ForegroundColor Yellow
Remove-MqttSession -Session $session
Write-Host "Session removed successfully!" -ForegroundColor Green