use of com.eden.orchid.api.server.OrchidFileController in project Orchid by JavaEden.
the class TaskServiceTest method setUp.
@BeforeEach
public void setUp() {
Set<OrchidTask> tasks = new HashSet<>();
OrchidTask task1 = mock(OrchidTask.class);
when(task1.getName()).thenReturn("task1");
tasks.add(task1);
OrchidTask task2 = mock(OrchidTask.class);
when(task2.getName()).thenReturn("task2");
tasks.add(task2);
Set<OrchidCommand> commands = new HashSet<>();
OrchidFileController controller = mock(OrchidFileController.class);
OrchidServer server = new OrchidServer(new HashSet<>(), controller);
FileWatcher fileWatcher = mock(FileWatcher.class);
// test the service directly
context = mock(OrchidContext.class);
service = new TaskServiceImpl(tasks, commands, "", 8080, server, fileWatcher);
service.initialize(context);
// test that the default implementation is identical to the real implementation
underTest = new TaskService() {
public void initialize(OrchidContext context) {
}
public <T extends OrchidService> T getService(Class<T> serviceClass) {
return (T) service;
}
};
}
Aggregations