-
Notifications
You must be signed in to change notification settings - Fork 28
/
TypeTest.kt
46 lines (41 loc) · 855 Bytes
/
TypeTest.kt
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Copyright (c) 2016. Michael Buhot m.buhot@gmail.com
*/
package mbuhot.eskotlin.query.term
import mbuhot.eskotlin.query.should_render_as
import org.junit.Test
/**
* Created on 3/03/2016
* @author Michael Buhot (m.buhot@gmail.com)
*/
class TypeTest {
@Test
fun `test type`() {
val query = type {
value = "my_type"
}
query should_render_as """
{
"type": {
"value" : "my_type",
"boost" : 1.0
}
}
"""
}
@Test
fun `test type with boost`() {
val query = type {
value = "my_type"
boost = 2.0f
}
query should_render_as """
{
"type": {
"value" : "my_type",
"boost" : 2.0
}
}
"""
}
}