Assert-DoesNotContain

OBSOLETE. Use Assert-That -DoesNotContain instead.

Syntax

Assert-DoesNotContain [[-Haystack] <Object>] [[-Needle] <Object>] [[-Message] <String>] [<CommonParameters>]

Description

OBSOLETE. Use Assert-That -DoesNotContain instead.

Parameters

Name Type Description Required? Pipeline Input Default Value
Haystack Object

The collection to check.

false false
Needle Object

The object the collection shouldn't have.

false false
Message String

A message to show when the assertion fails.

false false

EXAMPLE 1

Assert-That @( 1, 2, 3 ) -DoesNotContain 4

Demonstrates that you should use Assert-That instead.

EXAMPLE 2

Assert-That @( 1, 2, 3 ) -DoesNotContain 3 'Three is the loneliest number.'

Demonstrates that you should use Assert-That instead.