git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
system
/
general
/
src
/
test
/
java
/
org
/
wamblee
/
system
/
core
/
Environment.java
diff --git
a/system/general/src/test/java/org/wamblee/system/core/Environment.java
b/system/general/src/test/java/org/wamblee/system/core/Environment.java
index 00d947b7504e06948eedb178dc1ef6636cfd7308..c08f456d117ff6358c7e4cbe0b018038c8f1f320 100644
(file)
--- a/
system/general/src/test/java/org/wamblee/system/core/Environment.java
+++ b/
system/general/src/test/java/org/wamblee/system/core/Environment.java
@@
-25,19
+25,29
@@
import org.wamblee.test.EventTracker;
public class Environment extends AbstractComponent {
public class Environment extends AbstractComponent {
- private static final ProvidedInterface[] provided() {
+ private static final ProvidedInterface[] provided(
String aPrefix
) {
return new ProvidedInterface[] {
return new ProvidedInterface[] {
- new DefaultProvidedInterface("datasource", String.class),
- new DefaultProvidedInterface("integer", Integer.class) };
+ new DefaultProvidedInterface(
aPrefix +
"datasource", String.class),
+ new DefaultProvidedInterface(
aPrefix +
"integer", Integer.class) };
}
private EventTracker<String> _tracker;
private double _random;
public Environment() {
}
private EventTracker<String> _tracker;
private double _random;
public Environment() {
- super("environment", provided(), new RequiredInterface[0]);
- _random = Math.random();
+ this("environment");
}
}
+
+ public Environment(String aName) {
+ this(aName, "");
+ }
+
+ public Environment(String aName, String aPrefix) {
+ super(aName, provided(aPrefix), new RequiredInterface[0]);
+ _random = Math.random();
+ }
+
+
public Environment(EventTracker aTracker) {
this();
public Environment(EventTracker aTracker) {
this();
@@
-49,7
+59,7
@@
public class Environment extends AbstractComponent {
}
public String getString() {
}
public String getString() {
- return
"H
ello";
+ return
getName() + ".h
ello";
}
@Override
}
@Override