-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathql_test_class.mustache
More file actions
30 lines (27 loc) · 1.01 KB
/
ql_test_class.mustache
File metadata and controls
30 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// generated by {{generator}}, do not edit
import {{elements_module}}
import TestUtils
query predicate instances({{class_name}} x{{#show_ql_class}}, string primaryQlClasses{{/show_ql_class}}{{#properties}}{{#is_total}}, string {{getter}}__label, {{#type}}{{.}}{{/type}}{{^type}}string{{/type}} {{getter}}{{/is_total}}{{/properties}}) {
toBeTested(x) and not x.isUnknown()
{{#show_ql_class}}
and primaryQlClasses = x.getPrimaryQlClasses()
{{/show_ql_class}}
{{#properties}}
{{#is_total}}
and {{getter}}__label = "{{getter}}:"
{{#type}}
and {{getter}} = x.{{getter}}()
{{/type}}
{{^type}}
and if x.{{getter}}() then {{getter}} = "yes" else {{getter}} = "no"
{{/type}}
{{/is_total}}
{{/properties}}
}
{{#properties}}
{{^is_total}}
query predicate {{getter}}({{class_name}} x{{#is_indexed}}, int index{{/is_indexed}}, {{type}} {{getter}}) {
toBeTested(x) and not x.isUnknown() and {{getter}} = x.{{getter}}({{#is_indexed}}index{{/is_indexed}})
}
{{/is_total}}
{{/properties}}