Skip to content

Commit

Permalink
Importer: protocols + fix fromOpenTelemetrySpans: when spans is empty
Browse files Browse the repository at this point in the history
Always return a model, even if it is empty
  • Loading branch information
Gabriel-Darbord committed May 2, 2024
1 parent 7cedf35 commit ed7a167
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Famix-UnitTest-Importer/FamixUTImporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Class {
#category : #'Famix-UnitTest-Importer'
}

{ #category : #'instance creation' }
{ #category : #importing }
FamixUTImporter >> fromOpenTelemetrySpans: spans [
"Use a collection of FamixOTelSpan from the Famix-OpenTelemetry project as test oracle."

Expand All @@ -22,7 +22,7 @@ FamixUTImporter >> fromOpenTelemetrySpans: spans [
receiver: span receiver
arguments: span arguments
expected: span result) ] ].
^ model
^ self model
]

{ #category : #initialization }
Expand All @@ -31,19 +31,19 @@ FamixUTImporter >> initialize [
nameDict := Dictionary new
]

{ #category : #'instance creation' }
{ #category : #accessing }
FamixUTImporter >> model [

^ model ifNil: [ model := FamixUTModel new ]
]

{ #category : #'instance creation' }
{ #category : #accessing }
FamixUTImporter >> model: aFamixUTModel [

model := aFamixUTModel
]

{ #category : #tests }
{ #category : #importing }
FamixUTImporter >> testMethod: aFamixTMethod receiver: receiver arguments: arguments expected: expected [
"Build a unit test for a method using the given arguments and expected result."

Expand All @@ -69,7 +69,7 @@ FamixUTImporter >> testMethod: aFamixTMethod receiver: receiver arguments: argum
^ method
]

{ #category : #tests }
{ #category : #importing }
FamixUTImporter >> testMethodNameFor: aFamixTMethod [
"Give a unique name for a new test method."

Expand Down

0 comments on commit ed7a167

Please sign in to comment.