Commit 8eb2999 1 parent a20d1df commit 8eb2999 Copy full SHA for 8eb2999
File tree 1 file changed +20
-0
lines changed
tests/Moq.Tests/Regressions
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -3328,9 +3328,29 @@ public void Verify_passes_when_DefaultValue_Mock_and_setup_without_any_Returns()
3328
3328
totoMock . Verify ( ) ;
3329
3329
}
3330
3330
3331
+ [ Fact ]
3332
+ public void Verify_passes_when_DefaultValue_Mock_and_setup_with_Returns ( )
3333
+ {
3334
+ var totoMock = new Mock < IToto > ( ) ;
3335
+ var tataMock = new Mock < ITata > ( ) { DefaultValue = DefaultValue . Mock } ;
3336
+
3337
+ totoMock . Setup ( o => o . DoToto ( ) ) . Returns ( tataMock . Object ) . Verifiable ( ) ;
3338
+
3339
+ totoMock . Object . DoToto ( ) ;
3340
+ tataMock . Object . DoTata ( ) ;
3341
+
3342
+ totoMock . Verify ( ) ;
3343
+ }
3344
+
3331
3345
public interface IToto
3332
3346
{
3333
3347
IList < string > Do ( ) ;
3348
+ ITata DoToto ( ) ;
3349
+ }
3350
+
3351
+ public interface ITata
3352
+ {
3353
+ IList < string > DoTata ( ) ;
3334
3354
}
3335
3355
}
3336
3356
#endregion
You can’t perform that action at this time.
0 commit comments