Skip to content

Commit

Permalink
Version 1 Complete
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryDulaney committed Aug 27, 2020
1 parent d10630e commit 0be63ff
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 114 deletions.
9 changes: 2 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>com.commander</groupId>
<artifactId>FileCommander</artifactId>
<version>0.0.6</version>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>FileCommander</name>
<description>File format conversion system with settings for preferred file formatting by type</description>
Expand Down Expand Up @@ -86,11 +86,6 @@
<artifactId>fr.opensagres.poi.xwpf.converter.pdf</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.poi.xwpf.converter.xhtml</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.poi.xwpf.converter.core</artifactId>
Expand All @@ -115,7 +110,7 @@


<build>
<finalName>File-Commander-Original</finalName>
<finalName>File-Commander-1.0.0</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,6 @@ public static Convertible createClonePDFtoDOCX(String fileName, String directory
}


/**
* @param fileName
* @param directoryPath
* @param writeDirectoryPath
* @return new Convertible
*/
public static Convertible createDocx2HTML(String fileName, String directoryPath, String writeDirectoryPath) {
return new DocxToHtml(null, null);//TODO
}


/************************************************/
/* Excel File Format Convertible Builders *
Expand Down
198 changes: 101 additions & 97 deletions src/test/java/com/commander/SCTest.java
Original file line number Diff line number Diff line change
@@ -1,97 +1,101 @@
package com.commander;

import com.commander.model.User;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;

import javax.imageio.ImageIO;
import java.util.Arrays;


/**
* @author HGDIV
*/

@SpringBootTest
@ExtendWith(SpringExtension.class)
public class SCTest extends SCApplication {

org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(SCTest.class);


@Value("${application.test.inputpath}")
String fileInputTestPath;

@Value("${application.test.outputpath}")
String fileOutputTestPath;

@Autowired
User user;

final static String success = "Success";
final static String failed = "Failed";

boolean SystemLevelAccessTest = true;




@Test
void contextLoads() {
if (SystemLevelAccessTest) {
LOGGER.info("SYSTEM LEVEL ACCESS TEST WAS SUCCESSFUL: " + checkSystemLevelAccess());

}

}


private String checkSystemLevelAccess() {
try {
String tempDir = System.getProperty("java.io.tmpdir");
LOGGER.info("java.io.tmpdir : " + tempDir );

String home = System.getProperty("java.home");
LOGGER.info("java.home : " + home);

String osName = System.getProperty("os.name");
LOGGER.info("os.name : " + osName);

String userName = System.getProperty("user.name");
LOGGER.info("user.name : " + userName);

String homeDir = System.getProperty("user.home");
LOGGER.info("user.home : " + homeDir);

String userDir = System.getProperty("user.dir");
LOGGER.info("user.dir :" + userDir);

return success;

} catch (SecurityException | IllegalArgumentException | NullPointerException ex) {
ex.printStackTrace();
return failed;

}


}


private static class TestResource {

private static final String PROJECT_SOURCE_DELETE_KEY = "Delete";
private static final String PROJECT_SOURCE_SAVE_KEY = "Save";


}
private void printImgCompat(){
System.out.println("Image Reader Names : " + Arrays.toString(ImageIO.getReaderFormatNames()));
System.out.println("Image Reader Names : " + Arrays.toString(ImageIO.getWriterFormatNames()));

}
}
//package com.commander;
//
//import com.commander.model.User;
//import org.junit.jupiter.api.Test;
//import org.junit.jupiter.api.extension.ExtendWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.test.context.junit.jupiter.SpringExtension;
//
//import javax.imageio.ImageIO;
//import java.util.Arrays;
//
//
///**
// * @author HGDIV
// */
//
//@SpringBootTest
//@ExtendWith(SpringExtension.class)
//public class SCTest extends SCApplication {
//
// org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(SCTest.class);
//
//
// @Value("${application.test.inputpath}")
// String fileInputTestPath;
//
// @Value("${application.test.outputpath}")
// String fileOutputTestPath;
//
// User user;
//
// final static String success = "Success";
// final static String failed = "Failed";
//
// boolean SystemLevelAccessTest = false;
//
//
//
//
// @Test
// void contextLoads() {
// if (SystemLevelAccessTest) {
// LOGGER.info("SYSTEM LEVEL ACCESS TEST WAS SUCCESSFUL: " + checkSystemLevelAccess());
//
// }
//
// }
//
//
// private String checkSystemLevelAccess() {
// try {
// String tempDir = System.getProperty("java.io.tmpdir");
// LOGGER.info("java.io.tmpdir : " + tempDir );
//
// String home = System.getProperty("java.home");
// LOGGER.info("java.home : " + home);
//
// String osName = System.getProperty("os.name");
// LOGGER.info("os.name : " + osName);
//
// String userName = System.getProperty("user.name");
// LOGGER.info("user.name : " + userName);
//
// String homeDir = System.getProperty("user.home");
// LOGGER.info("user.home : " + homeDir);
//
// String userDir = System.getProperty("user.dir");
// LOGGER.info("user.dir :" + userDir);
//
// return success;
//
// } catch (SecurityException | IllegalArgumentException | NullPointerException ex) {
// ex.printStackTrace();
// return failed;
//
// }
//
//
// }
//
//
// private static class TestResource {
//
// private static final String PROJECT_SOURCE_DELETE_KEY = "Delete";
// private static final String PROJECT_SOURCE_SAVE_KEY = "Save";
//
//
// }
// private void printImgCompat(){
// System.out.println("Image Reader Names : " + Arrays.toString(ImageIO.getReaderFormatNames()));
// System.out.println("Image Reader Names : " + Arrays.toString(ImageIO.getWriterFormatNames()));
//
// }
// @Configuration
// static class ConfigTest {
//
// }
//}

0 comments on commit 0be63ff

Please sign in to comment.