@@ -54,9 +54,9 @@ void setup() {
54
54
void cleanUpDiamondWorkflow () {
55
55
var workflow = new WorkflowBuilder <TestCustomResource >()
56
56
.addDependentResource (dd1 )
57
- .addDependentResource (dr1 ).dependsOn (dd1 )
58
- .addDependentResource (dd2 ).dependsOn (dd1 )
59
- .addDependentResource (dd3 ).dependsOn (dr1 , dd2 )
57
+ .configuring (dr1 ).dependsOn (dd1 )
58
+ .configuring (dd2 ).dependsOn (dd1 )
59
+ .configuring (dd3 ).dependsOn (dr1 , dd2 )
60
60
.build ();
61
61
62
62
var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -73,9 +73,9 @@ void cleanUpDiamondWorkflow() {
73
73
void dontDeleteIfDependentErrored () {
74
74
var workflow = new WorkflowBuilder <TestCustomResource >()
75
75
.addDependentResource (dd1 )
76
- .addDependentResource (dd2 ).dependsOn (dd1 )
77
- .addDependentResource (dd3 ).dependsOn (dd2 )
78
- .addDependentResource (errorDD ).dependsOn (dd2 )
76
+ .configuring (dd2 ).dependsOn (dd1 )
77
+ .configuring (dd3 ).dependsOn (dd2 )
78
+ .configuring (errorDD ).dependsOn (dd2 )
79
79
.withThrowExceptionFurther (false )
80
80
.build ();
81
81
@@ -95,7 +95,7 @@ void dontDeleteIfDependentErrored() {
95
95
void cleanupConditionTrivialCase () {
96
96
var workflow = new WorkflowBuilder <TestCustomResource >()
97
97
.addDependentResource (dd1 )
98
- .addDependentResource (dd2 ).dependsOn (dd1 ).withDeletePostcondition (notMetCondition )
98
+ .configuring (dd2 ).dependsOn (dd1 ).withDeletePostcondition (notMetCondition )
99
99
.build ();
100
100
101
101
var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -110,7 +110,7 @@ void cleanupConditionTrivialCase() {
110
110
void cleanupConditionMet () {
111
111
var workflow = new WorkflowBuilder <TestCustomResource >()
112
112
.addDependentResource (dd1 )
113
- .addDependentResource (dd2 ).dependsOn (dd1 ).withDeletePostcondition (metCondition )
113
+ .configuring (dd2 ).dependsOn (dd1 ).withDeletePostcondition (metCondition )
114
114
.build ();
115
115
116
116
var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -126,9 +126,9 @@ void cleanupConditionMet() {
126
126
void cleanupConditionDiamondWorkflow () {
127
127
var workflow = new WorkflowBuilder <TestCustomResource >()
128
128
.addDependentResource (dd1 )
129
- .addDependentResource (dd2 ).dependsOn (dd1 )
130
- .addDependentResource (dd3 ).dependsOn (dd1 ).withDeletePostcondition (notMetCondition )
131
- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
129
+ .configuring (dd2 ).dependsOn (dd1 )
130
+ .configuring (dd3 ).dependsOn (dd1 ).withDeletePostcondition (notMetCondition )
131
+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
132
132
.build ();
133
133
134
134
var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -162,10 +162,10 @@ void dontDeleteIfGarbageCollected() {
162
162
void ifDependentActiveDependentNormallyDeleted () {
163
163
var workflow = new WorkflowBuilder <TestCustomResource >()
164
164
.addDependentResource (dd1 )
165
- .addDependentResource (dd2 ).dependsOn (dd1 )
166
- .addDependentResource (dd3 ).dependsOn (dd1 )
165
+ .configuring (dd2 ).dependsOn (dd1 )
166
+ .configuring (dd3 ).dependsOn (dd1 )
167
167
.withActivationCondition (metCondition )
168
- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
168
+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
169
169
.build ();
170
170
171
171
var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -182,11 +182,11 @@ void ifDependentActiveDependentNormallyDeleted() {
182
182
void ifDependentActiveDeletePostConditionIsChecked () {
183
183
var workflow = new WorkflowBuilder <TestCustomResource >()
184
184
.addDependentResource (dd1 )
185
- .addDependentResource (dd2 ).dependsOn (dd1 )
186
- .addDependentResource (dd3 ).dependsOn (dd1 )
185
+ .configuring (dd2 ).dependsOn (dd1 )
186
+ .configuring (dd3 ).dependsOn (dd1 )
187
187
.withDeletePostcondition (notMetCondition )
188
188
.withActivationCondition (metCondition )
189
- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
189
+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
190
190
.build ();
191
191
192
192
var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -206,10 +206,10 @@ void ifDependentActiveDeletePostConditionIsChecked() {
206
206
void ifDependentInactiveDeleteIsNotCalled () {
207
207
var workflow = new WorkflowBuilder <TestCustomResource >()
208
208
.addDependentResource (dd1 )
209
- .addDependentResource (dd2 ).dependsOn (dd1 )
210
- .addDependentResource (dd3 ).dependsOn (dd1 )
209
+ .configuring (dd2 ).dependsOn (dd1 )
210
+ .configuring (dd3 ).dependsOn (dd1 )
211
211
.withActivationCondition (notMetCondition )
212
- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
212
+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
213
213
.build ();
214
214
215
215
var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -225,11 +225,11 @@ void ifDependentInactiveDeleteIsNotCalled() {
225
225
void ifDependentInactiveDeletePostConditionNotChecked () {
226
226
var workflow = new WorkflowBuilder <TestCustomResource >()
227
227
.addDependentResource (dd1 )
228
- .addDependentResource (dd2 ).dependsOn (dd1 )
229
- .addDependentResource (dd3 ).dependsOn (dd1 )
228
+ .configuring (dd2 ).dependsOn (dd1 )
229
+ .configuring (dd3 ).dependsOn (dd1 )
230
230
.withDeletePostcondition (notMetCondition )
231
231
.withActivationCondition (notMetCondition )
232
- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
232
+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
233
233
.build ();
234
234
235
235
var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -243,7 +243,7 @@ void ifDependentInactiveDeletePostConditionNotChecked() {
243
243
@ Test
244
244
void singleInactiveDependent () {
245
245
var workflow = new WorkflowBuilder <TestCustomResource >()
246
- .addDependentResource (dd1 )
246
+ .configuring (dd1 )
247
247
.withActivationCondition (notMetCondition )
248
248
.build ();
249
249
0 commit comments