@@ -196,6 +196,17 @@ func TestWrapWithReconfigurable(t *testing.T) {
196
196
reconfBase2 , err := base .WrapWithReconfigurable (reconfBase1 )
197
197
test .That (t , err , test .ShouldBeNil )
198
198
test .That (t , reconfBase2 , test .ShouldEqual , reconfBase1 )
199
+
200
+ var actualBase2 base.LocalBase = & mockLocal {Name : testBaseName }
201
+ reconfBase3 , err := base .WrapWithReconfigurable (actualBase2 )
202
+ test .That (t , err , test .ShouldBeNil )
203
+
204
+ reconfBase4 , err := base .WrapWithReconfigurable (reconfBase3 )
205
+ test .That (t , err , test .ShouldBeNil )
206
+ test .That (t , reconfBase4 , test .ShouldResemble , reconfBase3 )
207
+
208
+ _ , ok := reconfBase4 .(base.LocalBase )
209
+ test .That (t , ok , test .ShouldBeTrue )
199
210
}
200
211
201
212
func TestReconfigurableBase (t * testing.T ) {
@@ -237,6 +248,15 @@ func TestReconfigurableBase(t *testing.T) {
237
248
err = reconfBase3 .Reconfigure (context .Background (), reconfBase1 )
238
249
test .That (t , err , test .ShouldNotBeNil )
239
250
test .That (t , err , test .ShouldBeError , rutils .NewUnexpectedTypeError (reconfBase3 , reconfBase1 ))
251
+
252
+ actualBase4 := & mock {Name : testBaseName2 }
253
+ reconfBase4 , err := base .WrapWithReconfigurable (actualBase4 )
254
+ test .That (t , err , test .ShouldBeNil )
255
+ test .That (t , reconfBase4 , test .ShouldNotBeNil )
256
+
257
+ err = reconfBase3 .Reconfigure (context .Background (), reconfBase4 )
258
+ test .That (t , err , test .ShouldBeNil )
259
+ test .That (t , reconfBase3 , test .ShouldResemble , reconfBase4 )
240
260
}
241
261
242
262
func TestClose (t * testing.T ) {
0 commit comments