-
Mar 17th, 2011, 01:56 PM
#1
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
-
Mar 19th, 2011, 01:56 PM
#2
Hi,
You can use org.springframework.core.ClassPathResource for this.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules