-
Notifications
You must be signed in to change notification settings - Fork 13
/
Main.scala
71 lines (58 loc) · 1.26 KB
/
Main.scala
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package app.impl.macros
import app.impl.macros.Macros._
import app.impl.scalaz.TestDSL
import org.junit.Test
/**
* Created by pabloperezgarcia on 09/07/2017.
*/
class Main extends TestDSL {
@Test
def helloWorld(): Unit = {
hello("world!")
printparam("test")
debug("test2")
println("End")
}
val y = 10
def test() {
val p = 11
debug(p)
debug(p + y)
}
@Test
def testPrintln(): Unit = {
test()
}
@Test
def testDSL(): Unit = {
Given(:: -> "A message with version 2.0", 1)
.When(:: -> "add '10'")
.And(:: -> "multiply by '20'")
.Then(:: -> "The result should be higher than '100'")
.runScenario
}
@Test
def testErrorDSL(): Unit = {
Given(:: -> "Giving a number", 1)
.When(:: -> "multiply by '20'")
.Then(:: -> "The result should be higher than '100'")
.runScenario
}
@Test
def testCheckResponse(): Unit = {
val x: String = "1"
Given(:: -> "A message with version 2.0", "1")
.flatMap(value => {
println(s"class:${value.getClass}")
// ResponseValidator.check(value.asInstanceOf[Int])
Given("", value)
}).runScenario
}
@Test
def testX(): Unit = {
testMain()
}
def testMain(): Unit = {
println("done")
}
}