public void testProjectSpecificPlugins() {
// Have two plugins with the same name but different class (and in different
// projects) in the same tree.
PluginInfo schedule1Info;
PluginInfo schedule2Info;
// Build custom PluginInfo hierarchies; one for the root and one for each project.
// The project hierarchies both have <schedule> plugins with different descriptions,
// allowing us to make sure that the right plugin info gets associated with each
// project.
AttributeInfo[] noAttrs = {};
ChildInfo[] noChildren = {};
PluginInfo rootInfo = new PluginInfo(null, "cruisecontrol", "", "", noAttrs, new ChildInfo[] {
new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
new PluginInfo(null, "project", "", "", noAttrs, new ChildInfo[] {
new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
new PluginInfo(null, "schedule", "root version of schedule", "", noAttrs, noChildren)
})})})});
PluginInfo proj1Info = new PluginInfo(null, "cruisecontrol", "", "", noAttrs, new ChildInfo[] {
new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
new PluginInfo(null, "project", "", "", noAttrs, new ChildInfo[] {
new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
schedule1Info = new PluginInfo(null, "schedule", "proj1 version of schedule", "", new AttributeInfo[] {
new AttributeInfo("interval", AttributeType.NUMBER, "", "", "", new int[] {0, 1}, "")
}, noChildren)
})})})});
PluginInfo proj2Info = new PluginInfo(null, "cruisecontrol", "", "", noAttrs, new ChildInfo[] {
new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
new PluginInfo(null, "project", "", "", noAttrs, new ChildInfo[] {
new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
schedule2Info = new PluginInfo(null, "schedule", "proj2 version of schedule", "", new AttributeInfo[] {
new AttributeInfo("interval", AttributeType.NUMBER, "", "", "", new int[] {0, 1}, "")
}, noChildren)
})})})});
// Build a custom MockServer.