public void testGetContents()
{
VariableStore store = new VariableStore();
store.startOutlet();
store.set(new Variable(
new QualifiedName("org.apache.torque.generator"),
"org.apache.torque.generator",
Variable.Scope.OUTLET));
store.set(new Variable(
new QualifiedName("org.apache.torque.children1"),
"org.apache.torque.children1",
Variable.Scope.CHILDREN));
store.startOutlet();
store.set(new Variable(
new QualifiedName("org.apache.torque.children2"),
"org.apache.torque.children2",
Variable.Scope.CHILDREN));
store.set(new Variable(
new QualifiedName("org.apache.torque.file"),
"org.apache.torque.file",
Variable.Scope.FILE));
store.set(new Variable(
new QualifiedName("org.apache.torque.global"),
"org.apache.torque.global",
Variable.Scope.GLOBAL));
QualifiedNameMap<Variable> storeContent = store.getContent();
assertEquals("storeContent should contain 5 entries",
5,
storeContent.size());
{
Variable variable
= storeContent.get(
new QualifiedName("org.apache.torque.generator"));
assertEquals(
"org.apache.torque.generator",
variable.getValue());
}
{
Variable variable
= storeContent.get(
new QualifiedName("org.apache.torque.children1"));
assertEquals(
"org.apache.torque.children1",
variable.getValue());
}
{
Variable variable
= storeContent.get(
new QualifiedName("org.apache.torque.children2"));
assertEquals(
"org.apache.torque.children2",
variable.getValue());
}
{
Variable variable
= storeContent.get(
new QualifiedName("org.apache.torque.file"));
assertEquals(
"org.apache.torque.file",
variable.getValue());
}
{
Variable variable
= storeContent.get(
new QualifiedName("org.apache.torque.global"));
assertEquals(
"org.apache.torque.global",
variable.getValue());
}
}