Link Search Menu Expand Document

Boolean functions

Comparisons

OperationDescriptionSignature
==It returns true if val1is equal to val2val1 == val2
!=It returns true if val1is equal to val2 and false otherwiseval1 != val2
||or comparatorval1 || val2
&&and comparatorval1 && val2
!not!val1
()group conditions(val1 && val2)

Example download

scenario "check boolean operations" {
  given "set value" {
    set val1{
         value = true
     }
  }
  when "do the operations" {
     set val2{
         value = !val1
     }
  }
  then "the result is the expected"{
      assert {
          assertion = val1 && !val2 && (val1 || val2) && !val2 && val2==false 
      }
  }
}