chevron-thin-right
chevron-thin-left
brand
cancel-circle
search
youtube-icon
google-plus-icon
linkedin-icon
facebook-icon
twitter-icon
toolbox
download
check
linkedin
phone
twitter-old
google-plus
facebook
profile-male
chat
calendar
profile-male
Products
Isolator for C++
Isolate ++
Isolator for .NET
Suggest
Isolate
Smart Runner
Coverage – Part of Typemock Isolator Complete .NET
Isolator for Build Server
Download
C++
.NET
Pricing
Resources
Documentation
Isolator++
Isolator
Learning Center
Tutorials
Webinars
Articles
Case Studies
Partners
Blog
Support
C++ Community
.NET Community
Premium Support
Products
Isolator for C++
Isolate ++
Isolator for .NET
Suggest
Isolate
Smart Runner
Coverage – Part of Typemock Isolator Complete .NET
Isolator for Build Server
Download
C++
.NET
Pricing
Resources
Documentation
Isolator++
Isolator
Learning Center
Tutorials
Webinars
Articles
Case Studies
Partners
Blog
Support
C++ Community
.NET Community
Premium Support
Menu
Search
Remember
Register
Typemock Q&A
Ask a question
All Activity
Questions
Hot!
Unanswered
Tags
Users
Ask a Question
The Unit Testing Company
Development Resources
Knowledge Base
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
Related questions
Using return with expect arguments
Method X has no matching overload that returns Y
How to Verify Multiple calls ?
2 calls returning different results
One more expected calls ??
Expect no calls
0
votes
Is there way to expect no calls on a method? I tried setting the expected number of calls to 0 in an ExpectAndReturn, but the test still passes even if the method is called.
Thanks,
Steve
asked
Jan 28, 2008
by
vertebrate
Report User
(
1.8k
points)
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
Hi,
What you need is to use the Strict flag and set it to true.
this will cause all unexpected calls to throw an exception.
:!: By default the Strict flags is set to false on mock created fro regular classes and is set to true on mocks created from interfaces and abstract classes.
answered
Jan 28, 2008
by
lior
Report User
(
13.2k
points)
Please
log in
or
register
to add a comment.
...
×
Choose the product type:
WINDOWS
LINUX DEB
LINUX RMP
×