Last change
on this file since 6361 was
6357,
checked in by cneumuel, 14 years ago
|
#1233
- refactoring of slave core
- created JobManager, which is responsible for managing jobs without knowing anything about the service. this class is easier testable than slave core
- lots of cleanup
- created console test project for slave
|
File size:
820 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using HeuristicLab.Clients.Hive.SlaveCore;
|
---|
4 | using HeuristicLab.Services.Hive.Common.DataTransfer;
|
---|
5 |
|
---|
6 | namespace HeuristicLab.Clients.Hive.Slave.Tests {
|
---|
7 | public class MockPluginService : IPluginProvider {
|
---|
8 |
|
---|
9 | public Dictionary<Guid, Plugin> Plugins;
|
---|
10 | public Dictionary<Guid, List<PluginData>> PluginDatas;
|
---|
11 |
|
---|
12 | public MockPluginService() {
|
---|
13 | this.Plugins = new Dictionary<Guid, Plugin>();
|
---|
14 | this.PluginDatas = new Dictionary<Guid, List<PluginData>>();
|
---|
15 | }
|
---|
16 |
|
---|
17 | public Plugin GetPlugin(Guid pluginId) {
|
---|
18 | return Plugins[pluginId];
|
---|
19 | }
|
---|
20 |
|
---|
21 | public IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds) {
|
---|
22 | foreach(var id in pluginIds)
|
---|
23 | foreach(var pd in PluginDatas[id])
|
---|
24 | yield return pd;
|
---|
25 | }
|
---|
26 | }
|
---|
27 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.