public class MockResourceOracle extends Object implements ResourceOracle
ResourceOracle
for testing.Constructor and Description |
---|
MockResourceOracle(Resource... resources) |
Modifier and Type | Method and Description |
---|---|
void |
add(Resource... resources) |
void |
addOrReplace(Resource... resources) |
void |
clear()
Frees up all existing resources and transient internal state.
|
Set<String> |
getPathNames()
Returns an unmodifiable set of unique abstract path names with constant
lookup time.
|
Map<String,Resource> |
getResourceMap()
Returns an unmodifiable map of abstract path name to resource.
|
Set<Resource> |
getResources()
Returns an unmodifiable set of unique resources with constant lookup time.
|
void |
remove(String... paths) |
void |
replace(Resource... resources) |
public MockResourceOracle(Resource... resources)
public void add(Resource... resources)
public void addOrReplace(Resource... resources)
public void clear()
ResourceOracle
clear
in interface ResourceOracle
public Set<String> getPathNames()
ResourceOracle
getPathNames
in interface ResourceOracle
public Map<String,Resource> getResourceMap()
ResourceOracle
getResourceMap
in interface ResourceOracle
public Set<Resource> getResources()
ResourceOracle
getResources
in interface ResourceOracle
public void remove(String... paths)
public void replace(Resource... resources)
Copyright © 2018. All rights reserved.