ONOS-4719 - Environmental vaiables dependency removed from UT
Change-Id: Id57ed2c7fbba9347b1b990c1305862460f78cbcd
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/ChoiceCaseTranslatorTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/ChoiceCaseTranslatorTest.java
index b872ab6..a9516eb 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/ChoiceCaseTranslatorTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/ChoiceCaseTranslatorTest.java
@@ -40,15 +40,14 @@
@Test
public void processChoiceCaseTranslator() throws IOException, ParserException {
- String userDir = System.getProperty("user.dir");
YangNode node = manager.getDataModel("src/test/resources/ChoiceCaseTranslator.yang");
YangPluginConfig yangPluginConfig = new YangPluginConfig();
- yangPluginConfig.setCodeGenDir(userDir + "/target/ChoiceCaseTestGenFile/");
+ yangPluginConfig.setCodeGenDir("target/ChoiceCaseTestGenFile/");
generateJavaCode(node, yangPluginConfig);
- deleteDirectory(userDir + "/target/ChoiceCaseTestGenFile/");
+ deleteDirectory("target/ChoiceCaseTestGenFile/");
}
// TODO enhance the test cases, after having a framework of translator test.
}
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/EnumTranslatorTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/EnumTranslatorTest.java
index 6956851..c8784c8 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/EnumTranslatorTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/EnumTranslatorTest.java
@@ -41,15 +41,14 @@
public void processEnumTranslator()
throws IOException, ParserException {
- String userDir = System.getProperty("user.dir");
YangNode node = manager.getDataModel("src/test/resources/EnumTranslator.yang");
YangPluginConfig yangPluginConfig = new YangPluginConfig();
- yangPluginConfig.setCodeGenDir(userDir + "/target/EnumTestGenFile/");
+ yangPluginConfig.setCodeGenDir("target/EnumTestGenFile/");
generateJavaCode(node, yangPluginConfig);
- deleteDirectory(userDir + "/target/EnumTestGenFile/");
+ deleteDirectory("target/EnumTestGenFile/");
}
// TODO enhance the test cases, after having a framework of translator test.
}
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/NotificationTranslatorTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/NotificationTranslatorTest.java
index 2801adf..ab98c76 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/NotificationTranslatorTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/NotificationTranslatorTest.java
@@ -41,15 +41,14 @@
public void processUnionTranslator()
throws IOException, ParserException {
- String userDir = System.getProperty("user.dir");
YangNode node = manager.getDataModel("src/test/resources/NotificationTest.yang");
YangPluginConfig yangPluginConfig = new YangPluginConfig();
- yangPluginConfig.setCodeGenDir(userDir + "/target/NotificationTest/");
+ yangPluginConfig.setCodeGenDir("target/NotificationTest/");
generateJavaCode(node, yangPluginConfig);
- deleteDirectory(userDir + "/target/NotificationTest/");
+ deleteDirectory("target/NotificationTest/");
}
// TODO enhance the test cases, after having a framework of translator test.
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/RpcTranslatorTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/RpcTranslatorTest.java
index 8f8b157..e34613d 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/RpcTranslatorTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/RpcTranslatorTest.java
@@ -41,15 +41,14 @@
public void processRpcTranslator()
throws IOException, ParserException {
- String userDir = System.getProperty("user.dir");
YangNode node = manager.getDataModel("src/test/resources/RpcTranslator.yang");
YangPluginConfig yangPluginConfig = new YangPluginConfig();
- yangPluginConfig.setCodeGenDir(userDir + "/target/RpcTestGenFile/");
+ yangPluginConfig.setCodeGenDir("target/RpcTestGenFile/");
generateJavaCode(node, yangPluginConfig);
- deleteDirectory(userDir + "/target/RpcTestGenFile/");
+ deleteDirectory("target/RpcTestGenFile/");
}
// TODO enhance the test cases, after having a framework of translator test.
}
diff --git a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/UnionTranslatorTest.java b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/UnionTranslatorTest.java
index 7682d19..b892edd 100644
--- a/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/UnionTranslatorTest.java
+++ b/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/UnionTranslatorTest.java
@@ -41,7 +41,6 @@
public void processUnionTranslator()
throws IOException, ParserException {
- String userDir = System.getProperty("user.dir");
YangNode node = manager.getDataModel("src/test/resources/UnionTranslator.yang");
YangPluginConfig yangPluginConfig = new YangPluginConfig();
@@ -49,7 +48,7 @@
generateJavaCode(node, yangPluginConfig);
- deleteDirectory(userDir + "/target/UnionTestGenFile/");
+ deleteDirectory("target/UnionTestGenFile/");
}
// TODO enhance the test cases, after having a framework of translator test.