Version: v5

Assert-MockCalled

SYNOPSIS

Checks if a Mocked command has been called a certain number of times and throws an exception if it has not.

THIS COMMAND IS OBSOLETE AND WILL BE REMOVED SOMEWHERE DURING v5 LIFETIME, USE Should -Invoke INSTEAD.

SYNTAX

ParameterFilter (Default)

Assert-MockCalled [-CommandName] <String> [[-Times] <Int32>] [-ParameterFilter <ScriptBlock>]
[-ModuleName <String>] [-Scope <String>] [-Exactly] [<CommonParameters>]

ExclusiveFilter

Assert-MockCalled [-CommandName] <String> [[-Times] <Int32>] [-ParameterFilter <ScriptBlock>]
-ExclusiveFilter <ScriptBlock> [-ModuleName <String>] [-Scope <String>] [-Exactly] [<CommonParameters>]

DESCRIPTION

{{ Fill in the Description }}

EXAMPLES

Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

PARAMETERS

-CommandName

{{ Fill CommandName Description }}

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Times

{{ Fill Times Description }}

Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False

-ParameterFilter

{{ Fill ParameterFilter Description }}

Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: {$True}
Accept pipeline input: False
Accept wildcard characters: False

-ExclusiveFilter

{{ Fill ExclusiveFilter Description }}

Type: ScriptBlock
Parameter Sets: ExclusiveFilter
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ModuleName

{{ Fill ModuleName Description }}

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope

{{ Fill Scope Description }}

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Exactly

{{ Fill Exactly Description }}

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

EDIT THIS PAGE

This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the pester/Pester repository. See our contribution guide for more information.