• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / Famix-UnitTest / 15590759202

11 Jun 2025 04:47PM UTC coverage: 27.322% (-4.2%) from 31.536%
15590759202

push

github

Gabriel-Darbord
Complete mappings
And finally fix tests!?

64 of 199 new or added lines in 10 files covered. (32.16%)

614 existing lines in 23 files now uncovered.

603 of 2207 relevant lines covered (27.32%)

0.27 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/Famix-UnitTest-Exporter/FamixUTJUnitJavaAssertionStrategy.class.st
1
Class {
2
        #name : 'FamixUTJUnitJavaAssertionStrategy',
3
        #superclass : 'FamixUTAbstractJavaAssertionStrategy',
4
        #category : 'Famix-UnitTest-Exporter-Strategies',
5
        #package : 'Famix-UnitTest-Exporter',
6
        #tag : 'Strategies'
7
}
8

9
{ #category : 'ast' }
10
FamixUTJUnitJavaAssertionStrategy >> dependencyImportsOn: aFamixUTExporter [
×
11

×
12
        | model |
×
13
        model := aFamixUTExporter model.
×
14
        ^ { (model newImportDeclaration
×
15
                   qualifiedName: (model newQualifiedName name:
×
16
                                            aFamixUTExporter nameOfJUnitPackage , '.'
×
17
                                            , aFamixUTExporter nameOfAssertionsClass);
×
18
                   isStatic: true;
×
UNCOV
19
                   isOnDemand: true) }
×
UNCOV
20
]
×
21

22
{ #category : 'exporting' }
23
FamixUTJUnitJavaAssertionStrategy >> export: aFamixUTAssertion on: exporter [
1✔
24

1✔
25
        | model actual expected expectedType |
1✔
26
        model := exporter model.
1✔
27
        actual := model newVariableExpression name: 'actual'.
1✔
28
        expected := exporter valueExporter makeVariableExpression:
1✔
29
                            aFamixUTAssertion expected.
1✔
30
        expectedType := aFamixUTAssertion expected type.
1✔
31
        (expectedType isClass and: [ expectedType isPrimitiveWrapper ])
1✔
32
                ifTrue: [ "assertEquals(Integer, int) is ambiguous, need an explicit cast."
1✔
33
                        expected := model newCastExpression
1✔
34
                                            type:
1✔
35
                                                    (expectedType asFASTJavaTypeExpressionOn:
1✔
36
                                                                     exporter valueExporter);
1✔
37
                                            expression: expected ].
1✔
38
        ^ model newExpressionStatement expression:
1✔
39
                  (model newMethodInvocation
1✔
40
                           name: 'assertEquals';
1✔
41
                           addArgument: expected;
1✔
42
                           addArgument: actual;
1✔
43
                           yourself)
1✔
44
]
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc