break;
default:
// only projects, modules and files are supported. Other types of components are not allowed.
- throw new IllegalStateException(format("Component of scope '%s' is not allowed", component.scope()));
+ throw new IllegalArgumentException(format("Component of scope '%s' is not allowed", component.scope()));
}
}
}
ComponentDto directory = db.components().insertComponent(newDirectory(project, "src/main/java"));
addPermissionTo(project);
- expectedException.expect(IllegalStateException.class);
+ expectedException.expect(IllegalArgumentException.class);
expectedException.expectMessage("Component of scope 'DIR' is not allowed");
call(directory.key());