# rule tests
# no detailed tests in java

FEATURE: rules
background:
  type Flight struct {id int unique, wid boolean optional }  end
thenType: struct

---
title: pass
given:
  type Flight2 Flight {} wid == true end
  insert Flight2 {id: 55, wid: true }
when:
  let x = Flight2[55]
then:
value:a:Flight2 {
 vid:55
 vwid:true
}

---
title: fail
given:
  type Flight2 Flight {} wid == true end
  insert Flight2 {id: 55, wid: false }
when:
  let x = Flight2[55];ERROR: rule-compare


#we assume nulls are handle the same as int
