@Test public void startsFromMortarScope() { MortarScope root = MortarScope.buildRootScope().build("Root"); MortarScope child = root.buildChild().build("Child"); String hierarchy = scopeHierarchyToString(child); assertThat(hierarchy).isEqualTo("" + "Mortar Hierarchy:\n" + BLANK + "SCOPE Root\n" + BLANK + "`-SCOPE Child\n" ); }
public static String scopeHierarchyToString(MortarScope mortarScope) { StringBuilder result = new StringBuilder("Mortar Hierarchy:\n"); MortarScope rootScope = getRootScope(mortarScope); Node rootNode = new MortarScopeNode(rootScope); nodeHierarchyToString(result, 0, 0, rootNode); return result.toString(); }
MortarScopeDevHelper { public static String scopeHierarchyToString(MortarScope mortarScope) { StringBuilder result = new StringBuilder("Mortar Hierarchy:\n"); MortarScope rootScope = getRootScope(mortarScope); Node rootNode = new MortarScopeNode(rootScope); nodeHierarchyToString(result, 0, 0, rootNode); return result.toString(); } }
MortarScopeDevHelper { public static String scopeHierarchyToString(MortarScope mortarScope) { StringBuilder result = new StringBuilder("Mortar Hierarchy:\n"); MortarScope rootScope = getRootScope(mortarScope); Node rootNode = new MortarScopeNode(rootScope); nodeHierarchyToString(result, 0, 0, rootNode); return result.toString(); } private  MortarScopeDevHelper(); }
MortarScopeDevHelper { public static String scopeHierarchyToString(MortarScope mortarScope) { StringBuilder result = new StringBuilder("Mortar Hierarchy:\n"); MortarScope rootScope = getRootScope(mortarScope); Node rootNode = new MortarScopeNode(rootScope); nodeHierarchyToString(result, 0, 0, rootNode); return result.toString(); } private  MortarScopeDevHelper(); static String scopeHierarchyToString(MortarScope mortarScope); }
MortarScopeDevHelper { public static String scopeHierarchyToString(MortarScope mortarScope) { StringBuilder result = new StringBuilder("Mortar Hierarchy:\n"); MortarScope rootScope = getRootScope(mortarScope); Node rootNode = new MortarScopeNode(rootScope); nodeHierarchyToString(result, 0, 0, rootNode); return result.toString(); } private  MortarScopeDevHelper(); static String scopeHierarchyToString(MortarScope mortarScope);  }