Skip to content

Commit

Permalink
Fix testExportAct
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Darbord committed Nov 20, 2024
1 parent de302af commit 2c85402
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions src/Famix-UnitTest-Exporter-Tests/FamixUTJUnitExporterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
A FamixUTJUnitExporterTest is a test class for testing the behavior of FamixUTJUnitExporter
"
Class {
#name : #FamixUTJUnitExporterTest,
#superclass : #TestCase,
#category : #'Famix-UnitTest-Exporter-Tests'
#name : 'FamixUTJUnitExporterTest',
#superclass : 'TestCase',
#category : 'Famix-UnitTest-Exporter-Tests',
#package : 'Famix-UnitTest-Exporter-Tests'
}

{ #category : #tests }
{ #category : 'tests' }
FamixUTJUnitExporterTest >> assertExport: aFASTEntity equals: expectedString [

self
assert: (FASTJavaExportVisitor new export: aFASTEntity)
equals: expectedString
]

{ #category : #tests }
{ #category : 'tests' }
FamixUTJUnitExporterTest >> assertExportCase: aFASTClassDeclaration equals: expectedString [
"Ignore the generated class comment."

Expand All @@ -27,7 +28,7 @@ FamixUTJUnitExporterTest >> assertExportCase: aFASTClassDeclaration equals: expe
self assert: actualString equals: expectedString
]

{ #category : #tests }
{ #category : 'tests' }
FamixUTJUnitExporterTest >> testExportAct [

| act method |
Expand All @@ -46,9 +47,10 @@ FamixUTJUnitExporterTest >> testExportAct [
'.

"with argument"
act arguments: { (FamixValueOfPrimitiveType new
type: (FamixJavaPrimitiveType new name: 'int');
value: 1) }.
act arguments:
{ (FamixUTActArgument new value: (FamixValueOfPrimitiveType new
type: (FamixJavaPrimitiveType new name: 'int');
value: 1)) }.
self
assertExport: (FamixUTJUnitExporter new exportAct: act)
equals: 'new MyClass().foo(int0);
Expand All @@ -63,7 +65,7 @@ FamixUTJUnitExporterTest >> testExportAct [
'
]

{ #category : #tests }
{ #category : 'tests' }
FamixUTJUnitExporterTest >> testExportAssertion [

| assertion |
Expand All @@ -84,7 +86,7 @@ FamixUTJUnitExporterTest >> testExportAssertion [
'
]

{ #category : #tests }
{ #category : 'tests' }
FamixUTJUnitExporterTest >> testExportCase [

| case |
Expand Down Expand Up @@ -116,7 +118,7 @@ FamixUTJUnitExporterTest >> testExportCase [
'
]

{ #category : #tests }
{ #category : 'tests' }
FamixUTJUnitExporterTest >> testExportMethod [

| method testMethod expected assertion setUp type arguments |
Expand Down
2 changes: 1 addition & 1 deletion src/Famix-UnitTest-Exporter-Tests/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'Famix-UnitTest-Exporter-Tests' }
Package { #name : 'Famix-UnitTest-Exporter-Tests' }

0 comments on commit 2c85402

Please sign in to comment.