Skip to content

Commit

Permalink
add notContains for #263
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed May 18, 2016
1 parent f1a62af commit 8b39af4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/canopy/canopy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ let contains (value1 : string) (value2 : string) =
if (value2.Contains(value1) <> true) then
raise (CanopyContainsFailedException(sprintf "contains check failed. %s does not contain %s" value2 value1))

let notContains (value1 : string) (value2 : string) =
if (value2.Contains(value1) = true) then
raise (CanopyNotContainsFailedException(sprintf "notContains check failed. %s does contain %s" value2 value1))

let count cssSelector count =
try
wait compareTimeout (fun _ -> (unreliableElements cssSelector).Length = count)
Expand Down
1 change: 1 addition & 0 deletions src/canopy/types.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type CanopyNotEqualsFailedException(message) = inherit CanopyException(message)
type CanopyValueNotInListException(message) = inherit CanopyException(message)
type CanopyValueInListException(message) = inherit CanopyException(message)
type CanopyContainsFailedException(message) = inherit CanopyException(message)
type CanopyNotContainsFailedException(message) = inherit CanopyException(message)
type CanopyCountException(message) = inherit CanopyException(message)
type CanopyDisplayedFailedException(message) = inherit CanopyException(message)
type CanopyNotDisplayedFailedException(message) = inherit CanopyException(message)
Expand Down

0 comments on commit 8b39af4

Please sign in to comment.