Update NoteTest

This commit is contained in:
Lee moon soo 2016-06-15 23:40:19 -07:00
parent e54d633ef3
commit 5bef173af7

View file

@ -54,13 +54,16 @@ public class NoteTest {
@Mock
Scheduler scheduler;
@Mock
NoteEventListener noteEventListener;
@Test
public void runNormalTest() {
when(replLoader.get("spark")).thenReturn(interpreter);
when(interpreter.getScheduler()).thenReturn(scheduler);
String pText = "%spark sc.version";
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials);
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials, noteEventListener);
Paragraph p = note.addParagraph();
p.setText(pText);
note.run(p.getId());
@ -79,7 +82,7 @@ public class NoteTest {
when(interpreter.getScheduler()).thenReturn(scheduler);
String pText = "%mysql show databases";
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials);
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials, noteEventListener);
Paragraph p = note.addParagraph();
p.setText(pText);
note.run(p.getId());