• 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

0.0
/src/Famix-UnitTest-Generator/FamixUnitTestGenerator.class.st
1
Class {
2
        #name : 'FamixUnitTestGenerator',
3
        #superclass : 'FamixMetamodelGenerator',
4
        #instVars : [
5
                'case',
6
                'suite',
7
                'fixture',
8
                'assertion',
9
                'method',
10
                'setUp',
11
                'tearDown',
12
                'value',
13
                'act',
14
                'actArgument'
15
        ],
16
        #category : 'Famix-UnitTest-Generator',
17
        #package : 'Famix-UnitTest-Generator'
18
}
19

20
{ #category : 'accessing' }
21
FamixUnitTestGenerator class >> packageName [
22

23
        <ignoreForCoverage>
24
        ^ #'Famix-UnitTest-Entities'
25
]
26

27
{ #category : 'accessing' }
28
FamixUnitTestGenerator class >> prefix [
29

30
        <ignoreForCoverage>
31
        ^ #FamixUT
32
]
33

34
{ #category : 'accessing' }
35
FamixUnitTestGenerator class >> submetamodels [
×
36

×
UNCOV
37
        ^ { FamixGenerator. FamixValueGenerator }
×
UNCOV
38
]
×
39

40
{ #category : 'definition' }
41
FamixUnitTestGenerator >> defineClasses [
×
42

×
43
        suite := builder
×
44
                         newClassNamed: #Suite
×
45
                         comment: 'A collection of test cases.'.
×
46
        case := builder
×
47
                        newClassNamed: #Case
×
48
                        comment: 'A class containing test methods.'.
×
49
        method := builder
×
50
                          newClassNamed: #Method
×
51
                          comment:
×
52
                          'Tests a specific behavior or feature of the system under test.'.
×
53
        act := builder
×
54
                       newClassNamed: #Act
×
55
                       comment: 'Execution of the system under test.'.
×
56
        actArgument := builder
×
57
                               newClassNamed: #ActArgument
×
58
                               comment:
×
59
                               'An association between an `Act` and a `Value` argument.'.
×
60
        assertion := builder
×
61
                             newClassNamed: #Assertion
×
62
                             comment:
×
63
                             'Verifies that the behavior or feature being tested behaves as expected.'.
×
64
        fixture := (builder
×
65
                            newClassNamed: #Fixture
×
66
                            comment:
×
67
                            'Sets up or tears down the system to make tests repeatable.')
×
68
                           isAbstractClass: true.
×
69
        setUp := builder
×
70
                         newClassNamed: #SetUp
×
71
                         comment: 'Sets up the system to make tests repeatable.'.
×
UNCOV
72
        tearDown := builder
×
UNCOV
73
                            newClassNamed: #TearDown
×
74
                            comment:
×
75
                            'Tears down the system to make tests repeatable.'.
×
76
        value := self remoteEntity: #OfType withPrefix: #FamixValue
×
77
]
×
78

79
{ #category : 'definition' }
80
FamixUnitTestGenerator >> defineHierarchy [
×
81

×
82
        setUp --|> fixture.
×
UNCOV
83
        tearDown --|> fixture.
×
UNCOV
84

×
85
        suite --|> #TNamedEntity.
×
86
        "case names aren't configurable by choice"
×
87
        method --|> #TNamedEntity
×
88
]
×
89

90
{ #category : 'definition' }
UNCOV
91
FamixUnitTestGenerator >> defineProperties [
×
92

×
93
        (assertion property: #errorMargin type: #Object) comment:
×
94
                'How much deviation is allowed between the expected and actual values.'
×
95
]
×
96

97
{ #category : 'definition' }
98
FamixUnitTestGenerator >> defineRelations [
×
99

×
100
        (suite property: #cases) <>-* case.
×
101
        (case property: #methods) <>-* method.
×
102
        (method property: #assertions) <>-* assertion.
×
103
        method <>- act.
×
104

×
105
        (suite property: #setUp) - (setUp property: #suite).
×
106
        (suite property: #tearDown) - (tearDown property: #suite).
×
107
        (case property: #beforeAll) - (setUp property: #forAllInCase).
×
108
        (case property: #afterAll) - (tearDown property: #forAllInCase).
×
109
        (case property: #beforeEach) - (setUp property: #forEachInCase).
×
110
        (case property: #afterEach) - (tearDown property: #forEachInCase).
×
111
        (method property: #setUp) - (setUp property: #method).
×
112
        (method property: #tearDown) - (tearDown property: #method).
×
113

×
114
        (fixture property: #values) *-* (value property: #fixtures).
×
115
        (assertion property: #expected)
×
116
        *- (value property: #expectedInAssertions).
×
117
        (act property: #arguments) -* (actArgument property: #act).
×
118
        (actArgument property: #value) *- (value property: #argumentInActs).
×
119
        (act property: #receiver) - (value property: #receiverInAct).
×
120

×
UNCOV
121
        (case property: #testedClass)
×
UNCOV
122
        - ((self remoteTrait: #TType withPrefix: #Famix) property: #testCase).
×
UNCOV
123
        (method property: #testedMethod)
×
UNCOV
124
        *-
×
UNCOV
125
        ((self remoteTrait: #TMethod withPrefix: #Famix) property: #unitTests)
×
UNCOV
126
]
×
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