@Test public void getRootPackageWithInvalidPrefix() throws TranslatorException { thrown.expect(TranslatorException.class); thrown.expectMessage("The given prefix in pom.xml is invalid."); conflictResolver.setPrefixForIdentifier(INVALID_PREFIX); String rootPackage1 = getRootPackage((byte) 1, INVALID_NAME_SPACE_FOR_INVALID_PREFIX, DATE1, conflictResolver); }
public static String getRootPackage(byte version, String nameSpace, String revision, YangToJavaNamingConflictUtil conflictResolver) { String pkg; pkg = DEFAULT_BASE_PKG; pkg = pkg + PERIOD; pkg = pkg + getYangVersion(version); pkg = pkg + PERIOD; pkg = pkg + getPkgFromNameSpace(nameSpace, conflictResolver); pkg = pkg + PERIOD; pkg = pkg + getYangRevisionStr(revision); return pkg.toLowerCase(); }
JavaIdentifierSyntax { public static String getRootPackage(byte version, String nameSpace, String revision, YangToJavaNamingConflictUtil conflictResolver) { String pkg; pkg = DEFAULT_BASE_PKG; pkg = pkg + PERIOD; pkg = pkg + getYangVersion(version); pkg = pkg + PERIOD; pkg = pkg + getPkgFromNameSpace(nameSpace, conflictResolver); pkg = pkg + PERIOD; pkg = pkg + getYangRevisionStr(revision); return pkg.toLowerCase(); } }
JavaIdentifierSyntax { public static String getRootPackage(byte version, String nameSpace, String revision, YangToJavaNamingConflictUtil conflictResolver) { String pkg; pkg = DEFAULT_BASE_PKG; pkg = pkg + PERIOD; pkg = pkg + getYangVersion(version); pkg = pkg + PERIOD; pkg = pkg + getPkgFromNameSpace(nameSpace, conflictResolver); pkg = pkg + PERIOD; pkg = pkg + getYangRevisionStr(revision); return pkg.toLowerCase(); } private  JavaIdentifierSyntax(); }
JavaIdentifierSyntax { public static String getRootPackage(byte version, String nameSpace, String revision, YangToJavaNamingConflictUtil conflictResolver) { String pkg; pkg = DEFAULT_BASE_PKG; pkg = pkg + PERIOD; pkg = pkg + getYangVersion(version); pkg = pkg + PERIOD; pkg = pkg + getPkgFromNameSpace(nameSpace, conflictResolver); pkg = pkg + PERIOD; pkg = pkg + getYangRevisionStr(revision); return pkg.toLowerCase(); } private  JavaIdentifierSyntax(); static String getRootPackage(byte version, String nameSpace, String revision,
                                        YangToJavaNamingConflictUtil conflictResolver); static String getEnumJavaAttribute(String name); static void createPackage(YangNode yangNode); static boolean doesPackageExist(String pkg); }
JavaIdentifierSyntax { public static String getRootPackage(byte version, String nameSpace, String revision, YangToJavaNamingConflictUtil conflictResolver) { String pkg; pkg = DEFAULT_BASE_PKG; pkg = pkg + PERIOD; pkg = pkg + getYangVersion(version); pkg = pkg + PERIOD; pkg = pkg + getPkgFromNameSpace(nameSpace, conflictResolver); pkg = pkg + PERIOD; pkg = pkg + getYangRevisionStr(revision); return pkg.toLowerCase(); } private  JavaIdentifierSyntax(); static String getRootPackage(byte version, String nameSpace, String revision,
                                        YangToJavaNamingConflictUtil conflictResolver); static String getEnumJavaAttribute(String name); static void createPackage(YangNode yangNode); static boolean doesPackageExist(String pkg);  }