@Test public void testObjectTypePairsToString() throws Exception { Exception cause = new NullPointerException(); Map<String, RepositoryObjectType> notFoundedReferences = new LinkedHashMap<String, RepositoryObjectType>(); String pathToTransStub = "/path/Trans.ktr"; String pathToJobStub = "/path/Job.ktr"; notFoundedReferences.put( pathToTransStub, RepositoryObjectType.TRANSFORMATION ); notFoundedReferences.put( pathToJobStub, RepositoryObjectType.JOB ); String expectedOutput = System.lineSeparator() + "\"/path/Trans.ktr\" [transformation] " + System.lineSeparator() + "\"/path/Job.ktr\" [job] "; try { throw new LookupReferencesException( cause, notFoundedReferences ); } catch ( LookupReferencesException testedException ) { String actual = testedException.objectTypePairsToString(); assertEquals( expectedOutput, actual ); assertNotNull( testedException.getCause() ); } }
public String objectTypePairsToString() { StringBuilder result = new StringBuilder(); for ( Map.Entry entry : objectTypePairs.entrySet() ) { if ( entry.getKey() != null ) { result.append( Const.CR ); result.append( "\"" ); result.append( entry.getKey() ); result.append( "\"" ); result.append( " [" ); result.append( entry.getValue() ); result.append( "] " ); } } return result.toString(); }
LookupReferencesException extends KettleException { public String objectTypePairsToString() { StringBuilder result = new StringBuilder(); for ( Map.Entry entry : objectTypePairs.entrySet() ) { if ( entry.getKey() != null ) { result.append( Const.CR ); result.append( "\"" ); result.append( entry.getKey() ); result.append( "\"" ); result.append( " [" ); result.append( entry.getValue() ); result.append( "] " ); } } return result.toString(); } }
LookupReferencesException extends KettleException { public String objectTypePairsToString() { StringBuilder result = new StringBuilder(); for ( Map.Entry entry : objectTypePairs.entrySet() ) { if ( entry.getKey() != null ) { result.append( Const.CR ); result.append( "\"" ); result.append( entry.getKey() ); result.append( "\"" ); result.append( " [" ); result.append( entry.getValue() ); result.append( "] " ); } } return result.toString(); } LookupReferencesException( Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( String message, Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( Throwable cause, Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( String message, Throwable cause,
      Map<String, RepositoryObjectType> objectTypePairs ); }
LookupReferencesException extends KettleException { public String objectTypePairsToString() { StringBuilder result = new StringBuilder(); for ( Map.Entry entry : objectTypePairs.entrySet() ) { if ( entry.getKey() != null ) { result.append( Const.CR ); result.append( "\"" ); result.append( entry.getKey() ); result.append( "\"" ); result.append( " [" ); result.append( entry.getValue() ); result.append( "] " ); } } return result.toString(); } LookupReferencesException( Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( String message, Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( Throwable cause, Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( String message, Throwable cause,
      Map<String, RepositoryObjectType> objectTypePairs ); String objectTypePairsToString(); }
LookupReferencesException extends KettleException { public String objectTypePairsToString() { StringBuilder result = new StringBuilder(); for ( Map.Entry entry : objectTypePairs.entrySet() ) { if ( entry.getKey() != null ) { result.append( Const.CR ); result.append( "\"" ); result.append( entry.getKey() ); result.append( "\"" ); result.append( " [" ); result.append( entry.getValue() ); result.append( "] " ); } } return result.toString(); } LookupReferencesException( Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( String message, Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( Throwable cause, Map<String, RepositoryObjectType> objectTypePairs );  LookupReferencesException( String message, Throwable cause,
      Map<String, RepositoryObjectType> objectTypePairs ); String objectTypePairsToString(); static final long serialVersionUID; }