Hi,
Just to point out the two pieces of code are not identical.
This has to do with understanding the Repeat and Chained Statements.
:arrow: When using Repeat/Return TypeMock refers to the LAST statement in the chain.
So the first example expects 1 call to SmartTextManager.GetInstance and 3 calls to SetProfileValue on the returned instance.
While the second example expects 3 calls to SmartTextManager.GetInstance and each call expects 1 call to SetProfileValue.
Currently to repeat all the statements in the chain use:
recorder.DefaultBehavior.Repeat(3)
SmartTextManager.GetInstance.SetProfileValue(Nothing)
this will tell TypeMock to repeat all the methods in the chain.