@Test public void testGetResources() throws Exception { ClusterDefinition clusterDefinition = new ClusterDefinition(new TestStateProvider(), new TestClusterDefinitionProvider(), new TestHostInfoProvider()); clusterDefinition.getTaskResources().add(new ResourceImpl(Resource.Type.Task)); TaskProvider provider = new TaskProvider(clusterDefinition); Set<Resource> resources = provider.getResources(PropertyHelper.getReadRequest(), null); Assert.assertEquals(1, resources.size()); }
@Override protected Set<Resource> getResources() { return getClusterDefinition().getTaskResources(); }
TaskProvider extends AbstractResourceProvider { @Override protected Set<Resource> getResources() { return getClusterDefinition().getTaskResources(); } }
TaskProvider extends AbstractResourceProvider { @Override protected Set<Resource> getResources() { return getClusterDefinition().getTaskResources(); } TaskProvider(ClusterDefinition clusterDefinition); }
TaskProvider extends AbstractResourceProvider { @Override protected Set<Resource> getResources() { return getClusterDefinition().getTaskResources(); } TaskProvider(ClusterDefinition clusterDefinition); @Override void updateProperties(Resource resource, Request request, Predicate predicate); @Override int updateProperties(Resource resource, Map<String, Object> properties); }
TaskProvider extends AbstractResourceProvider { @Override protected Set<Resource> getResources() { return getClusterDefinition().getTaskResources(); } TaskProvider(ClusterDefinition clusterDefinition); @Override void updateProperties(Resource resource, Request request, Predicate predicate); @Override int updateProperties(Resource resource, Map<String, Object> properties);  }