You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a method with input parameters of type Expression<Func<T,bool>>, the mock setup is not returning the expected value when called inside using statement with transaction inside the using statement.
Let' say my expression is x=>x.Userid==userid where userid is an input parameter of the test method
This setup works outside the transaction scope and increases the callback but when I call inside the transaction it do not increase the callback. Upon Debugging when I call inside the transaction the expression value changes to {(t.UserId == value( DisplayClass29_1).CS$<>8__locals1.userId)}
here .CS$<>8__locals1 is added extra to the expression.
FYR
When I call the same method outside transaction {(t.UserId == value(DisplayClass29_0).userId)} looks like this
The text was updated successfully, but these errors were encountered:
Closing this issue since no repro code was provided. @Arulselvan2408, if you do have (minimally complete) repro code, please post it and I'll take another look.
When a method with input parameters of type Expression<Func<T,bool>>, the mock setup is not returning the expected value when called inside using statement with transaction inside the using statement.
Let' say my expression is x=>x.Userid==userid where userid is an input parameter of the test method
mock.SetUp(x=>x.SearchFor(expression)).Returns(some expected value).Callback(()=>++counter)
This setup works outside the transaction scope and increases the callback but when I call inside the transaction it do not increase the callback. Upon Debugging when I call inside the transaction the expression value changes to {(t.UserId == value( DisplayClass29_1).CS$<>8__locals1.userId)}
here .CS$<>8__locals1 is added extra to the expression.
FYR
When I call the same method outside transaction {(t.UserId == value(DisplayClass29_0).userId)} looks like this
The text was updated successfully, but these errors were encountered: