Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception.
This can be used in tandem with the -Verifiable switch of the Mock function. Mock can be used to mock the behavior of an existing command and optionally take a -Verifiable switch. When Assert-VerifiableMock is called, it checks to see if any Mock marked Verifiable has not been invoked. If any mocks have been found that specified -Verifiable and have not been invoked, an exception will be thrown.
This will throw an exception and cause the test to fail.
This will not throw an exception because the mock was invoked.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
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.