From 20fffe26be91e23d7d9a64fd9b0f856d823fb075 Mon Sep 17 00:00:00 2001 From: Gabriel Darbord Date: Tue, 30 Jan 2024 17:08:49 +0100 Subject: [PATCH] Always export helper --- .../FamixJavaParameterType.extension.st | 7 +++++++ .../FamixUTAbstractExporter.class.st | 1 + src/Famix-UnitTest-Exporter/FamixUTJUnitExporter.class.st | 3 +-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/Famix-UnitTest-Exporter/FamixJavaParameterType.extension.st diff --git a/src/Famix-UnitTest-Exporter/FamixJavaParameterType.extension.st b/src/Famix-UnitTest-Exporter/FamixJavaParameterType.extension.st new file mode 100644 index 0000000..020e80f --- /dev/null +++ b/src/Famix-UnitTest-Exporter/FamixJavaParameterType.extension.st @@ -0,0 +1,7 @@ +Extension { #name : #FamixJavaParameterType } + +{ #category : #'*Famix-UnitTest-Exporter' } +FamixJavaParameterType >> needsJavaImport [ + + ^ false +] diff --git a/src/Famix-UnitTest-Exporter/FamixUTAbstractExporter.class.st b/src/Famix-UnitTest-Exporter/FamixUTAbstractExporter.class.st index 3ae1cd3..2ed6e5e 100644 --- a/src/Famix-UnitTest-Exporter/FamixUTAbstractExporter.class.st +++ b/src/Famix-UnitTest-Exporter/FamixUTAbstractExporter.class.st @@ -23,6 +23,7 @@ FamixUTAbstractExporter >> export: aFamixUTModel [ self exportCaseFile: case ]. (aFamixUTModel allWithType: FamixUTSuite) do: [ :suite | self exportSuite: suite ]. + self valueExporter makeHelper. ^ self model ] diff --git a/src/Famix-UnitTest-Exporter/FamixUTJUnitExporter.class.st b/src/Famix-UnitTest-Exporter/FamixUTJUnitExporter.class.st index ae18497..8c7cec5 100644 --- a/src/Famix-UnitTest-Exporter/FamixUTJUnitExporter.class.st +++ b/src/Famix-UnitTest-Exporter/FamixUTJUnitExporter.class.st @@ -57,8 +57,7 @@ FamixUTJUnitExporter >> exportAssertion: aFamixUTAssertion [ { #category : #exporting } FamixUTJUnitExporter >> exportCase: aFamixUTCase [ - currentClass := self model newClassDeclaration. - currentClass + (currentClass := self model newClassDeclaration) name: aFamixUTCase name; addModifier: (model newModifier token: 'public'); addComment: self makeTestCaseComment;