-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'newgen' of https://github.com/d3scomp/JDEECo.git into
newgen Conflicts: jdeeco-core/test/cz/cuni/mff/d3s/deeco/scheduler/LocalTimeSchedulerTest.java jdeeco-core/test/cz/cuni/mff/d3s/deeco/scheduler/SchedulerTest.java
- Loading branch information
Showing
4 changed files
with
341 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 23 additions & 21 deletions
44
jdeeco-core/src/cz/cuni/mff/d3s/deeco/scheduler/Scheduler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
/** | ||
*/ | ||
package cz.cuni.mff.d3s.deeco.scheduler; | ||
|
||
import java.util.List; | ||
|
||
import cz.cuni.mff.d3s.deeco.executor.ExecutionListener; | ||
import cz.cuni.mff.d3s.deeco.executor.Executor; | ||
import cz.cuni.mff.d3s.deeco.task.Task; | ||
|
||
|
||
//FIXME TB: The class does not have the header stating the author | ||
// test text | ||
|
||
public interface Scheduler extends ExecutionListener { | ||
public void start(); | ||
public void stop(); | ||
public void addTask( Task task ); | ||
public void removeTask( Task task ); | ||
|
||
void setExecutor(Executor executor); | ||
package cz.cuni.mff.d3s.deeco.scheduler; | ||
|
||
import cz.cuni.mff.d3s.deeco.executor.ExecutionListener; | ||
import cz.cuni.mff.d3s.deeco.executor.Executor; | ||
import cz.cuni.mff.d3s.deeco.task.Task; | ||
|
||
|
||
/** | ||
* Interface Scheduler for LocalTimeScheduler(and others if needed) | ||
* | ||
* @author Andranik Muradyan <muradian@d3s.mff.cuni.cz> | ||
* | ||
*/ | ||
public interface Scheduler extends ExecutionListener { | ||
public void start(); | ||
public void stop(); | ||
public void addTask( Task task ); | ||
public void removeTask( Task task ); | ||
|
||
public void executionFailed(Task task, Exception e); | ||
public void executionCompleted( Task task ); | ||
public void setExecutor(Executor executor); | ||
|
||
} |
30 changes: 12 additions & 18 deletions
30
jdeeco-core/test/cz/cuni/mff/d3s/deeco/scheduler/LocalTimeSchedulerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
/** | ||
*/ | ||
package cz.cuni.mff.d3s.deeco.scheduler; | ||
|
||
import static org.mockito.Mockito.mock; | ||
|
||
import org.junit.Before; | ||
|
||
import cz.cuni.mff.d3s.deeco.executor.Executor; | ||
|
||
//FIXME TB: The class is missing a header which states the author | ||
/** | ||
* Factory for Scheduler implementation tests | ||
* | ||
* @author Jaroslav Keznikl <keznikl@d3s.mff.cuni.cz> | ||
* | ||
*/ | ||
public class LocalTimeSchedulerTest extends SchedulerTest { | ||
|
||
public class LocalTimeSchedulerTest { | ||
LocalTimeScheduler sched; | ||
Executor executor; | ||
|
||
@Before | ||
public void setUp() throws Exception{ | ||
executor = mock(Executor.class); | ||
sched = new LocalTimeScheduler(); | ||
sched.setExecutor(executor); | ||
@Override | ||
protected Scheduler setUpTested(Executor executor) { | ||
Scheduler s = new LocalTimeScheduler(); | ||
s.setExecutor(executor); | ||
return s; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.