16
16
import java .util .HashMap ;
17
17
import java .util .Map ;
18
18
19
- import org .junit .Ignore ;
20
- import org .junit .Test ;
19
+ import org .junit .jupiter . api . Assertions ;
20
+ import org .junit .jupiter . api . Test ;
21
21
22
22
import org .springframework .core .io .FileSystemResource ;
23
23
import org .springframework .integration .scripting .ScriptExecutor ;
24
24
import org .springframework .integration .scripting .jsr223 .ScriptExecutorFactory ;
25
25
import org .springframework .scripting .support .ResourceScriptSource ;
26
26
27
- import static org .junit .Assert .assertNotNull ;
28
- import static org .junit .Assert .assertTrue ;
29
-
30
27
/**
31
28
* @author David Turanski
32
29
* @author Artem Bilan
33
- *
34
30
*/
35
31
public class ScriptTests {
36
32
@@ -46,13 +42,11 @@ public void testRuby() {
46
42
47
43
Object obj = executor .executeScript (
48
44
new ResourceScriptSource (new FileSystemResource ("scripts/ruby/barista.rb" )), variables );
49
- assertNotNull (obj );
50
- assertTrue (obj instanceof Drink );
51
-
45
+ Assertions .assertNotNull (obj );
46
+ Assertions .assertInstanceOf (Drink .class , obj );
52
47
}
53
48
54
49
@ Test
55
- @ Ignore
56
50
public void testPython () {
57
51
ScriptExecutor executor = ScriptExecutorFactory .getScriptExecutor ("python" );
58
52
Order order = new Order (0 );
@@ -63,8 +57,8 @@ public void testPython() {
63
57
64
58
Object obj = executor .executeScript (new ResourceScriptSource (
65
59
new FileSystemResource ("scripts/python/barista.py" )), variables );
66
- assertNotNull (obj );
67
- assertTrue (obj instanceof Drink );
68
-
60
+ Assertions .assertNotNull (obj );
61
+ Assertions .assertInstanceOf (Drink .class , obj );
69
62
}
63
+
70
64
}
0 commit comments