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

moosetechnology / Famix-UnitTest / 8925849213

02 May 2024 02:47PM UTC coverage: 31.856% (-4.4%) from 36.213%
8925849213

push

github

fabiovandewaeter
Exporter: implement SUnitExporter

2 of 168 new or added lines in 4 files covered. (1.19%)

35 existing lines in 3 files now uncovered.

503 of 1579 relevant lines covered (31.86%)

0.32 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
        ],
15
        #category : #'Famix-UnitTest-Generator'
16
}
17

18
{ #category : #accessing }
19
FamixUnitTestGenerator class >> packageName [
20

21
        <ignoreForCoverage>
22
        ^ #'Famix-UnitTest-Entities'
23
]
24

25
{ #category : #accessing }
26
FamixUnitTestGenerator class >> prefix [
27

28
        <ignoreForCoverage>
29
        ^ #FamixUT
30
]
31

32
{ #category : #accessing }
33
FamixUnitTestGenerator class >> submetamodels [
×
34

×
35
        ^ { FamixGenerator. FamixValueGenerator }
×
36
]
×
37

38
{ #category : #definition }
39
FamixUnitTestGenerator >> defineClasses [
×
40

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

73
{ #category : #definition }
74
FamixUnitTestGenerator >> defineHierarchy [
×
75

×
76
        setUp --|> fixture.
×
77
        tearDown --|> fixture.
×
78

×
79
        suite --|> #TNamedEntity.
×
80
        "case names aren't configurable by choice"
×
81
        method --|> #TNamedEntity
×
82
]
×
83

84
{ #category : #definition }
85
FamixUnitTestGenerator >> defineProperties [
×
86

×
87
        (assertion property: #errorMargin type: #Object) comment:
×
88
                'How much deviation is allowed between the expected and actual values.'
×
89
]
×
90

91
{ #category : #definition }
92
FamixUnitTestGenerator >> defineRelations [
×
93

×
94
        (suite property: #cases) <>-* case.
×
95
        (case property: #methods) <>-* method.
×
96
        (method property: #assertions) <>-* assertion.
×
97
        method <>- act.
×
98

×
99
        (suite property: #setUp) - (setUp property: #suite).
×
100
        (suite property: #tearDown) - (tearDown property: #suite).
×
101
        (case property: #beforeAll) - (setUp property: #forAllInCase).
×
102
        (case property: #afterAll) - (tearDown property: #forAllInCase).
×
103
        (case property: #beforeEach) - (setUp property: #forEachInCase).
×
104
        (case property: #afterEach) - (tearDown property: #forEachInCase).
×
105
        (method property: #setUp) - (setUp property: #method).
×
106
        (method property: #tearDown) - (tearDown property: #method).
×
107

×
108
        (fixture property: #values) *-* (value property: #fixtures).
×
109
        (assertion property: #expected)
×
110
        *- (value property: #expectedInAssertions).
×
111
        (act property: #arguments) -* (value property: #argumentInAct).
×
112
        (act property: #receiver) - (value property: #receiverInAct).
×
113

×
114
        (case property: #testedClass)
×
115
        -
×
116
        ((self remoteTrait: #TClass withPrefix: #Famix) property: #testCase).
×
117
        (method property: #testedMethod)
×
118
        *-
×
119
        ((self remoteTrait: #TMethod withPrefix: #Famix) property: #unitTests)
×
UNCOV
120
]
×
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

© 2026 Coveralls, Inc