@@ -67,7 +67,8 @@ void canCreatePlantUMLDiagramFiles() {
67
67
68
68
// when
69
69
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
70
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
70
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
71
+ new IGeneratorContextMock ());
71
72
72
73
// then
73
74
assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_ContextMap.puml" ));
@@ -85,7 +86,8 @@ void canCreateBoundedContextClassDiagramsWithoutContextMap() {
85
86
86
87
// when
87
88
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
88
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
89
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
90
+ new IGeneratorContextMock ());
89
91
90
92
// then
91
93
assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_BC_TestContext.puml" ));
@@ -108,7 +110,8 @@ void canCreatePlantUMLDiagrmFiles4SubdomainIfEntitiesAvailable() {
108
110
109
111
// when
110
112
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
111
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
113
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
114
+ new IGeneratorContextMock ());
112
115
113
116
// then
114
117
assertFalse (filesystem .getGeneratedFilesSet ().contains ("testmodel_SD_TestSubdomain1.puml" ));
@@ -118,100 +121,133 @@ void canCreatePlantUMLDiagrmFiles4SubdomainIfEntitiesAvailable() {
118
121
@ Test
119
122
void canCreateStateDiagram4ApplicationFlowIfAvailable () throws IOException {
120
123
// given
121
- ContextMappingModel model = getOriginalResourceOfTestCML ("state-diagram-generation-flow-test.cml" ).getContextMappingModel ();
124
+ ContextMappingModel model = getOriginalResourceOfTestCML ("state-diagram-generation-flow-test.cml" )
125
+ .getContextMappingModel ();
122
126
123
127
// when
124
128
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
125
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
129
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
130
+ new IGeneratorContextMock ());
126
131
127
132
// then
128
- assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_BC_InsuranceQuotes_QuoteFlow_StateDiagram.puml" ));
133
+ assertTrue (
134
+ filesystem .getGeneratedFilesSet ().contains ("testmodel_BC_InsuranceQuotes_QuoteFlow_StateDiagram.puml" ));
129
135
}
130
136
131
137
@ Test
132
138
void canCreateClass4AggregateIfAvailable () throws IOException {
133
139
// given
134
- ContextMappingModel model = getOriginalResourceOfTestCML ("class-diagram-generation-aggregate-test-1.cml" ).getContextMappingModel ();
140
+ ContextMappingModel model = getOriginalResourceOfTestCML ("class-diagram-generation-aggregate-test-1.cml" )
141
+ .getContextMappingModel ();
135
142
136
143
// when
137
144
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
138
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
145
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
146
+ new IGeneratorContextMock ());
139
147
140
148
// then
141
149
assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_BC_InsuranceQuotes_QuoteRequest.puml" ));
142
150
}
143
-
151
+
144
152
@ Test
145
153
void canCreateClass4ModuleIfAvailable () throws IOException {
146
154
// given
147
- ContextMappingModel model = getOriginalResourceOfTestCML ("class-diagram-generation-module-test-1.cml" ).getContextMappingModel ();
155
+ ContextMappingModel model = getOriginalResourceOfTestCML ("class-diagram-generation-module-test-1.cml" )
156
+ .getContextMappingModel ();
148
157
149
158
// when
150
159
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
151
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
160
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
161
+ new IGeneratorContextMock ());
152
162
153
163
// then
154
164
assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_BC_InsuranceQuotes_QuoteRequest.puml" ));
155
165
}
156
-
166
+
157
167
@ Test
158
168
void canCreateStateDiagram4AggregateIfAvailable () throws IOException {
159
169
// given
160
- ContextMappingModel model = getOriginalResourceOfTestCML ("state-diagram-generation-aggregate-test-1.cml" ).getContextMappingModel ();
170
+ ContextMappingModel model = getOriginalResourceOfTestCML ("state-diagram-generation-aggregate-test-1.cml" )
171
+ .getContextMappingModel ();
161
172
162
173
// when
163
174
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
164
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
175
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
176
+ new IGeneratorContextMock ());
165
177
166
178
// then
167
- assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_BC_InsuranceQuotes_QuoteRequest_StateDiagram.puml" ));
179
+ assertTrue (filesystem .getGeneratedFilesSet ()
180
+ .contains ("testmodel_BC_InsuranceQuotes_QuoteRequest_StateDiagram.puml" ));
168
181
}
169
-
182
+
170
183
@ Test
171
184
void canCreateUseCaseDiagram4UseCasesIfAvailable () throws IOException {
172
185
// given
173
- ContextMappingModel model = getOriginalResourceOfTestCML ("use-case-diagram-generation-test-1.cml" ).getContextMappingModel ();
186
+ ContextMappingModel model = getOriginalResourceOfTestCML ("use-case-diagram-generation-test-1.cml" )
187
+ .getContextMappingModel ();
174
188
175
189
// when
176
190
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
177
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
191
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
192
+ new IGeneratorContextMock ());
178
193
179
194
// then
180
195
assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_UseCases.puml" ));
181
196
}
182
-
197
+
183
198
@ Test
184
199
void canCreateSequenceDiagram4UseCaseInteractionsIfAvailable () throws IOException {
185
200
// given
186
- ContextMappingModel model = getOriginalResourceOfTestCML ("use-case-diagram-generation-test-1.cml" ).getContextMappingModel ();
201
+ ContextMappingModel model = getOriginalResourceOfTestCML ("use-case-diagram-generation-test-1.cml" )
202
+ .getContextMappingModel ();
187
203
188
204
// when
189
205
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
190
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
206
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
207
+ new IGeneratorContextMock ());
191
208
192
209
// then
193
- assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_UseCase_Get_paid_for_car_accident_Interactions.puml" ));
210
+ assertTrue (filesystem .getGeneratedFilesSet ()
211
+ .contains ("testmodel_UseCase_Get_paid_for_car_accident_Interactions.puml" ));
194
212
}
195
-
213
+
196
214
@ Test
197
215
void canCreateStakeholderDiagramsIfStakeholdersAreAvailable () throws IOException {
198
216
// given
199
- ContextMappingModel model = getOriginalResourceOfTestCML ("stakeholder-diagram-generation-test-1.cml" ). getContextMappingModel ();
200
-
201
-
217
+ ContextMappingModel model = getOriginalResourceOfTestCML ("stakeholder-diagram-generation-test-1.cml" )
218
+ . getContextMappingModel ();
219
+
202
220
// when
203
221
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
204
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
205
-
222
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
223
+ new IGeneratorContextMock ());
224
+
206
225
// then
207
226
assertTrue (filesystem .getGeneratedFilesSet ().contains ("testmodel_BC_System-of-Interest_StakeholderMap-1.puml" ));
208
227
}
209
228
229
+ @ Test
230
+ void canCreateValueImpactMapDiagramsIfValueRegistersAreAvailable () throws IOException {
231
+ // given
232
+ ContextMappingModel model = getOriginalResourceOfTestCML ("value-impact-map-diagram-generation-test-1.cml" )
233
+ .getContextMappingModel ();
234
+
235
+ // when
236
+ IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
237
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
238
+ new IGeneratorContextMock ());
239
+
240
+ // then
241
+ assertTrue (
242
+ filesystem .getGeneratedFilesSet ().contains ("testmodel_ValueRegister_SD_Values_Value-Impact-Map.puml" ));
243
+ }
244
+
210
245
@ Test
211
246
void expectExceptionForEmptyResource () {
212
247
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
213
248
assertThrows (GeneratorInputException .class , () -> {
214
- this .generator .doGenerate (new ContextMappingModelResourceMock (null , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
249
+ this .generator .doGenerate (new ContextMappingModelResourceMock (null , "testmodel" , "cml" ), filesystem ,
250
+ new IGeneratorContextMock ());
215
251
});
216
252
}
217
253
@@ -220,7 +256,8 @@ void expectExceptionForEmptyContextMappingModel() {
220
256
ContextMappingModel model = ContextMappingDSLFactory .eINSTANCE .createContextMappingModel ();
221
257
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
222
258
assertThrows (GeneratorInputException .class , () -> {
223
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
259
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
260
+ new IGeneratorContextMock ());
224
261
});
225
262
}
226
263
@@ -232,7 +269,8 @@ void expectExceptionIfThereIsOnlyAnEmptyDomain() {
232
269
model .getDomains ().add (emptyDomain );
233
270
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock ();
234
271
assertThrows (GeneratorInputException .class , () -> {
235
- this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem , new IGeneratorContextMock ());
272
+ this .generator .doGenerate (new ContextMappingModelResourceMock (model , "testmodel" , "cml" ), filesystem ,
273
+ new IGeneratorContextMock ());
236
274
});
237
275
}
238
276
0 commit comments