@@ -54,9 +54,9 @@ void setup() {
5454 void cleanUpDiamondWorkflow () {
5555 var workflow = new WorkflowBuilder <TestCustomResource >()
5656 .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 )
6060 .build ();
6161
6262 var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -73,9 +73,9 @@ void cleanUpDiamondWorkflow() {
7373 void dontDeleteIfDependentErrored () {
7474 var workflow = new WorkflowBuilder <TestCustomResource >()
7575 .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 )
7979 .withThrowExceptionFurther (false )
8080 .build ();
8181
@@ -95,7 +95,7 @@ void dontDeleteIfDependentErrored() {
9595 void cleanupConditionTrivialCase () {
9696 var workflow = new WorkflowBuilder <TestCustomResource >()
9797 .addDependentResource (dd1 )
98- .addDependentResource (dd2 ).dependsOn (dd1 ).withDeletePostcondition (notMetCondition )
98+ .configuring (dd2 ).dependsOn (dd1 ).withDeletePostcondition (notMetCondition )
9999 .build ();
100100
101101 var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -110,7 +110,7 @@ void cleanupConditionTrivialCase() {
110110 void cleanupConditionMet () {
111111 var workflow = new WorkflowBuilder <TestCustomResource >()
112112 .addDependentResource (dd1 )
113- .addDependentResource (dd2 ).dependsOn (dd1 ).withDeletePostcondition (metCondition )
113+ .configuring (dd2 ).dependsOn (dd1 ).withDeletePostcondition (metCondition )
114114 .build ();
115115
116116 var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -126,9 +126,9 @@ void cleanupConditionMet() {
126126 void cleanupConditionDiamondWorkflow () {
127127 var workflow = new WorkflowBuilder <TestCustomResource >()
128128 .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 )
132132 .build ();
133133
134134 var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -162,10 +162,10 @@ void dontDeleteIfGarbageCollected() {
162162 void ifDependentActiveDependentNormallyDeleted () {
163163 var workflow = new WorkflowBuilder <TestCustomResource >()
164164 .addDependentResource (dd1 )
165- .addDependentResource (dd2 ).dependsOn (dd1 )
166- .addDependentResource (dd3 ).dependsOn (dd1 )
165+ .configuring (dd2 ).dependsOn (dd1 )
166+ .configuring (dd3 ).dependsOn (dd1 )
167167 .withActivationCondition (metCondition )
168- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
168+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
169169 .build ();
170170
171171 var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -182,11 +182,11 @@ void ifDependentActiveDependentNormallyDeleted() {
182182 void ifDependentActiveDeletePostConditionIsChecked () {
183183 var workflow = new WorkflowBuilder <TestCustomResource >()
184184 .addDependentResource (dd1 )
185- .addDependentResource (dd2 ).dependsOn (dd1 )
186- .addDependentResource (dd3 ).dependsOn (dd1 )
185+ .configuring (dd2 ).dependsOn (dd1 )
186+ .configuring (dd3 ).dependsOn (dd1 )
187187 .withDeletePostcondition (notMetCondition )
188188 .withActivationCondition (metCondition )
189- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
189+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
190190 .build ();
191191
192192 var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -206,10 +206,10 @@ void ifDependentActiveDeletePostConditionIsChecked() {
206206 void ifDependentInactiveDeleteIsNotCalled () {
207207 var workflow = new WorkflowBuilder <TestCustomResource >()
208208 .addDependentResource (dd1 )
209- .addDependentResource (dd2 ).dependsOn (dd1 )
210- .addDependentResource (dd3 ).dependsOn (dd1 )
209+ .configuring (dd2 ).dependsOn (dd1 )
210+ .configuring (dd3 ).dependsOn (dd1 )
211211 .withActivationCondition (notMetCondition )
212- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
212+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
213213 .build ();
214214
215215 var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -225,11 +225,11 @@ void ifDependentInactiveDeleteIsNotCalled() {
225225 void ifDependentInactiveDeletePostConditionNotChecked () {
226226 var workflow = new WorkflowBuilder <TestCustomResource >()
227227 .addDependentResource (dd1 )
228- .addDependentResource (dd2 ).dependsOn (dd1 )
229- .addDependentResource (dd3 ).dependsOn (dd1 )
228+ .configuring (dd2 ).dependsOn (dd1 )
229+ .configuring (dd3 ).dependsOn (dd1 )
230230 .withDeletePostcondition (notMetCondition )
231231 .withActivationCondition (notMetCondition )
232- .addDependentResource (dd4 ).dependsOn (dd2 , dd3 )
232+ .configuring (dd4 ).dependsOn (dd2 , dd3 )
233233 .build ();
234234
235235 var res = workflow .cleanup (new TestCustomResource (), mockContext );
@@ -243,7 +243,7 @@ void ifDependentInactiveDeletePostConditionNotChecked() {
243243 @ Test
244244 void singleInactiveDependent () {
245245 var workflow = new WorkflowBuilder <TestCustomResource >()
246- .addDependentResource (dd1 )
246+ .configuring (dd1 )
247247 .withActivationCondition (notMetCondition )
248248 .build ();
249249
0 commit comments