Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void testWhetherWeCanWriteToConf() {
- File folder = new File("/home/k-joseph/.OpenMRS/solr/conf");
- File file = new File("/home/k-joseph/.OpenMRS/solr/conf/testing");
- Assert.assertFalse(file.exists());
- if (folder.exists()) {
- try {
- file.createNewFile();
- }
- catch (IOException e) {
- // TODO Auto-generated catch block
- System.out.println("Failed to create "+ file.getPath()+" file");
- }
- System.out.println("Successfully created "+file.getPath()+" file");
- }
- Assert.assertTrue(file.exists());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement