Assert-Contains

OBSOLETE. Use Assert-That -Contains instead.

Syntax

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

Description

OBSOLETE. Use Assert-That -Contains instead.

Parameters

Name Type Description Required? Pipeline Input Default Value
Haystack Object

The collection to check.

false false
Needle Object

The object to check the collection for.

false false
Message String

A message to show when the assertion fails.

false false

EXAMPLE 1

Assert-That @( 1, 2, 3 ) -Contains 3

Demonstrates that you should use Assert-That instead.

EXAMPLE 2

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

Demonstrates that you should use Assert-That instead.