Results 1 to 5 of 5

Thread: "Test" in entity names

  1. #1
    Join Date
    Jan 2005
    Posts
    6

    Default "Test" in entity names

    Hi,

    I'm just trying out Roo by building a small app for managing (manual) test cases. Unfortunately, Roo seems to reject all entity names that have "test" in their names, regardless in which package they are. This is pretty restricitive (try finding another appropriate naming for "TestCase", "TestPlan" etc...) Is there any way out of this?

    Thanks ,
    Hauke

  2. #2
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    668

    Smile

    TeztCase?
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

  3. #3
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    When you say Roo is rejecting them, can you please elaborate (perhaps by sharing the commands you're typing and/or the messages Roo is giving)?
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  4. #4
    Join Date
    Jan 2005
    Posts
    6

    Default

    roo>
    entity --class ~.model.TestCase
    Entity name rejected as conflicts with test execution defaults; please remove 'Test' and/or 'TestCase'

  5. #5
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Roo has a list of reserved words it checks against. There are a number of SQL related keywords which are on that list for obvious reasons but also a number of reserved words in Java. Test is part of that list to prevent clashes with unit testing frameworks such as JUnit.

    You can usually switch off this checking if you are confident that your specific keyword will not clash anywhere by using the --permitReservedWords attribute:

    Code:
    ~.TestCase roo> entity --class ~.TestCase --permitReservedWords
    Entity name rejected as conflicts with test execution defaults; please remove 'Test' and/or 'TestCase'
    As you can see it is still rejected, so it would be good if you could open a Jira ticket so we can look into this.

    Cheers,
    Stefan
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •