Bharat saraswal
Committed by Thomas Vachuska

ONOS-4719 - Environmental vaiables dependency removed from UT

Change-Id: Id57ed2c7fbba9347b1b990c1305862460f78cbcd
...@@ -40,15 +40,14 @@ public final class ChoiceCaseTranslatorTest { ...@@ -40,15 +40,14 @@ public final class ChoiceCaseTranslatorTest {
40 @Test 40 @Test
41 public void processChoiceCaseTranslator() throws IOException, ParserException { 41 public void processChoiceCaseTranslator() throws IOException, ParserException {
42 42
43 - String userDir = System.getProperty("user.dir");
44 YangNode node = manager.getDataModel("src/test/resources/ChoiceCaseTranslator.yang"); 43 YangNode node = manager.getDataModel("src/test/resources/ChoiceCaseTranslator.yang");
45 44
46 YangPluginConfig yangPluginConfig = new YangPluginConfig(); 45 YangPluginConfig yangPluginConfig = new YangPluginConfig();
47 - yangPluginConfig.setCodeGenDir(userDir + "/target/ChoiceCaseTestGenFile/"); 46 + yangPluginConfig.setCodeGenDir("target/ChoiceCaseTestGenFile/");
48 47
49 generateJavaCode(node, yangPluginConfig); 48 generateJavaCode(node, yangPluginConfig);
50 49
51 - deleteDirectory(userDir + "/target/ChoiceCaseTestGenFile/"); 50 + deleteDirectory("target/ChoiceCaseTestGenFile/");
52 } 51 }
53 // TODO enhance the test cases, after having a framework of translator test. 52 // TODO enhance the test cases, after having a framework of translator test.
54 } 53 }
......
...@@ -41,15 +41,14 @@ public final class EnumTranslatorTest { ...@@ -41,15 +41,14 @@ public final class EnumTranslatorTest {
41 public void processEnumTranslator() 41 public void processEnumTranslator()
42 throws IOException, ParserException { 42 throws IOException, ParserException {
43 43
44 - String userDir = System.getProperty("user.dir");
45 YangNode node = manager.getDataModel("src/test/resources/EnumTranslator.yang"); 44 YangNode node = manager.getDataModel("src/test/resources/EnumTranslator.yang");
46 45
47 YangPluginConfig yangPluginConfig = new YangPluginConfig(); 46 YangPluginConfig yangPluginConfig = new YangPluginConfig();
48 - yangPluginConfig.setCodeGenDir(userDir + "/target/EnumTestGenFile/"); 47 + yangPluginConfig.setCodeGenDir("target/EnumTestGenFile/");
49 48
50 generateJavaCode(node, yangPluginConfig); 49 generateJavaCode(node, yangPluginConfig);
51 50
52 - deleteDirectory(userDir + "/target/EnumTestGenFile/"); 51 + deleteDirectory("target/EnumTestGenFile/");
53 } 52 }
54 // TODO enhance the test cases, after having a framework of translator test. 53 // TODO enhance the test cases, after having a framework of translator test.
55 } 54 }
......
...@@ -41,15 +41,14 @@ public final class NotificationTranslatorTest { ...@@ -41,15 +41,14 @@ public final class NotificationTranslatorTest {
41 public void processUnionTranslator() 41 public void processUnionTranslator()
42 throws IOException, ParserException { 42 throws IOException, ParserException {
43 43
44 - String userDir = System.getProperty("user.dir");
45 YangNode node = manager.getDataModel("src/test/resources/NotificationTest.yang"); 44 YangNode node = manager.getDataModel("src/test/resources/NotificationTest.yang");
46 45
47 YangPluginConfig yangPluginConfig = new YangPluginConfig(); 46 YangPluginConfig yangPluginConfig = new YangPluginConfig();
48 - yangPluginConfig.setCodeGenDir(userDir + "/target/NotificationTest/"); 47 + yangPluginConfig.setCodeGenDir("target/NotificationTest/");
49 48
50 generateJavaCode(node, yangPluginConfig); 49 generateJavaCode(node, yangPluginConfig);
51 50
52 - deleteDirectory(userDir + "/target/NotificationTest/"); 51 + deleteDirectory("target/NotificationTest/");
53 } 52 }
54 53
55 // TODO enhance the test cases, after having a framework of translator test. 54 // TODO enhance the test cases, after having a framework of translator test.
......
...@@ -41,15 +41,14 @@ public final class RpcTranslatorTest { ...@@ -41,15 +41,14 @@ public final class RpcTranslatorTest {
41 public void processRpcTranslator() 41 public void processRpcTranslator()
42 throws IOException, ParserException { 42 throws IOException, ParserException {
43 43
44 - String userDir = System.getProperty("user.dir");
45 YangNode node = manager.getDataModel("src/test/resources/RpcTranslator.yang"); 44 YangNode node = manager.getDataModel("src/test/resources/RpcTranslator.yang");
46 45
47 YangPluginConfig yangPluginConfig = new YangPluginConfig(); 46 YangPluginConfig yangPluginConfig = new YangPluginConfig();
48 - yangPluginConfig.setCodeGenDir(userDir + "/target/RpcTestGenFile/"); 47 + yangPluginConfig.setCodeGenDir("target/RpcTestGenFile/");
49 48
50 generateJavaCode(node, yangPluginConfig); 49 generateJavaCode(node, yangPluginConfig);
51 50
52 - deleteDirectory(userDir + "/target/RpcTestGenFile/"); 51 + deleteDirectory("target/RpcTestGenFile/");
53 } 52 }
54 // TODO enhance the test cases, after having a framework of translator test. 53 // TODO enhance the test cases, after having a framework of translator test.
55 } 54 }
......
...@@ -41,7 +41,6 @@ public final class UnionTranslatorTest { ...@@ -41,7 +41,6 @@ public final class UnionTranslatorTest {
41 public void processUnionTranslator() 41 public void processUnionTranslator()
42 throws IOException, ParserException { 42 throws IOException, ParserException {
43 43
44 - String userDir = System.getProperty("user.dir");
45 YangNode node = manager.getDataModel("src/test/resources/UnionTranslator.yang"); 44 YangNode node = manager.getDataModel("src/test/resources/UnionTranslator.yang");
46 45
47 YangPluginConfig yangPluginConfig = new YangPluginConfig(); 46 YangPluginConfig yangPluginConfig = new YangPluginConfig();
...@@ -49,7 +48,7 @@ public final class UnionTranslatorTest { ...@@ -49,7 +48,7 @@ public final class UnionTranslatorTest {
49 48
50 generateJavaCode(node, yangPluginConfig); 49 generateJavaCode(node, yangPluginConfig);
51 50
52 - deleteDirectory(userDir + "/target/UnionTestGenFile/"); 51 + deleteDirectory("target/UnionTestGenFile/");
53 } 52 }
54 53
55 // TODO enhance the test cases, after having a framework of translator test. 54 // TODO enhance the test cases, after having a framework of translator test.
......