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
How to test Event "-="
Isolator++ rising event sample
Null reference exception when removing event handlers
Fire of multiple mocked event handlers
Null Reference Error When Trying To Unit Test Code Setting
Sample code to test event handlers & Methods returning v
0
votes
Hi,
Can I get sample code (in C#.Net) on how to create unit test cases for event handlers and methods that return Void using Isolator?
Thanks
asked
Jul 1, 2010
by
Swathi
Report User
(
1.2k
points)
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2
Answers
0
votes
Hi Swathi,
You can verify a void method was called using the Verify API:
Isolate.Verify.WasCalledWithAnyArguments(() => obj.VoidMethod());
You're welcome to take a look at a simple example on our
introduction page
.
Can you please describe what are you trying to test on the events? We have an API for raising events but I am not sure that this is what you're looking for.
Regards,
Elisha,
Typemock Support
answered
Jul 1, 2010
by
Elisha
Report User
(
12k
points)
Please
log in
or
register
to add a comment.
0
votes
Hi Swathi.
the installation of Isolator comes with a sample project that contains several working examples.
take a look at them you should find examples for void and events there.
answered
Jul 2, 2010
by
error
Report User
(
6.6k
points)
Please
log in
or
register
to add a comment.
...
×
Choose the product type:
WINDOWS
LINUX DEB
LINUX RMP
×