Tests/Unit/Public/Connection/Assert-MicrosoftTeamsConnection.Tests.ps1
# Module: Orbit.Authentication # Function: Test # Author: David Eberhardt # Updated: 03-JUN 2023 # Script Analyzer Exceptions #[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUserDeclaredVarsMoreThanAssignments', '', Justification = 'Context Boundaries')] # Unit Tests Describe -Tags ('Unit', 'Acceptance') "Function '$(((Split-Path -Leaf $PsCommandPath) -replace '\.Tests\.', '.') -replace '\.ps1', '')'" { InModuleScope -ModuleName 'Orbit.Authentication' { BeforeAll { # Mocking basic connection commands to avoid connectivity related errors Mock Assert-GraphConnection { return $true } Mock Test-GraphConnection { return $true } Mock Assert-MicrosoftTeamsConnection { return $true } Mock Test-MicrosoftTeamsConnection { return $true } # Splatting Parameters $Params = @{ WarningAction = 'SilentlyContinue' InformationAction = 'SilentlyContinue' } # Dot Sourcing Mock Objects . "$(Split-Path -Parent ((Split-Path -Parent $PsScriptRoot) -split 'Tests')[0])\Orbit\Tests\Testing-MockedObjects.ps1" } Context 'Input' { # Pipeline, Position, etc. } Context 'Execution' { # Code Logic } Context 'Output' { #Properties, Values, Types } } } |