Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Issue #39, path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcasters committed Jan 21, 2019
1 parent fb6ae17 commit ae4e0a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -145,5 +145,5 @@
</dependencyManagement>

<groupId>pentaho-kettle-dataset</groupId>
<version>3.4.1-SNAPSHOT</version>
<version>3.4.2-SNAPSHOT</version>
</project>
18 changes: 12 additions & 6 deletions src/main/java/org/pentaho/di/dataset/spoon/DataSetHelper.java
Expand Up @@ -1231,14 +1231,20 @@ public void openUnitTestTransformation() {
if ( selection != null ) {
String filename = selection.getString( 2, null );
if ( StringUtils.isNotEmpty( filename ) ) {
spoon.openFile( filename, false );

TransMeta transMeta = spoon.getActiveTransformation();
// Now select the unit test...
// Load the unit test...
//
String unitTestName = selection.getString( 0, null );
TransUnitTest targetTest = hierarchy.getTestFactory().loadElement( unitTestName );
if ( transMeta != null && targetTest != null ) {
switchUnitTest( targetTest, transMeta );

if ( targetTest != null ) {

String completeFilename = targetTest.calculateCompleteFilename( Variables.getADefaultVariableSpace() );
spoon.openFile( completeFilename, false );

TransMeta transMeta = spoon.getActiveTransformation();
if (transMeta!=null) {
switchUnitTest( targetTest, transMeta );
}
}
} else {
throw new KettleException( "No filename found: repositories not supported yet for this feature" );
Expand Down

0 comments on commit ae4e0a8

Please sign in to comment.