Announcement Announcement Module
Collapse
No announcement yet.
JUnit - Absolute path of test resources Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JUnit - Absolute path of test resources

    Hi

    I'm writing a JUnit class where I need to pass the absolute path of a document file to the actual method. I'm thinking of placing this document file in test resources folder and use it for JUnit. Can someone please help me with some pointers on how to get the absolute path of a test resources? The following are the other details.

    Spring version - 3.0
    Build - Maven
    Document is placed under test/resources/ folder

  • #2
    Hi,

    You can use org.springframework.core.ClassPathResource for this.

    Comment

    Working...
    X