473,802 Members | 2,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mock Objects Tool

Hi,
curious if there is a tool available for creating Mock Objects in C++ the
JAVA style.

kutty
Jul 22 '05 #1
1 1751
Kutty Banerjee wrote:
curious if there is a tool available for creating Mock Objects in C++ the
JAVA style.


That's a great pattern. I've been using these for years, but never had
a name for them until now. :)

The "mockpp homepage" at sourceforge looks promising. It was the first
link I found when I googled for C++ Mock Objects.

http://www.google.com/search?hl=en&i...=Google+Search
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1976
by: John J. Lee | last post by:
I had the bright idea a week or two ago to construct mock objects (for unit testing) "by example" by calling methods on a generic mock object. Say we have a class Bar, and we want to check that, when we use BarUser in a particular way, BarUser first calls method Bar.xyzzy with args "foo" and bar=2, then method Bar.do_nothing. # first, construct a mock object by example: m = Mock()
1
1788
by: ischenko | last post by:
There is a (relatively) widely used technique in unit testing, called mock objects. There is even a pMock library which provides a Mock class for a Python environment. Given the "duck typing" nature of the Python itself, it's pretty trivial to build mocks without using any pre-built libraries. What is less trivial and potentially more worthwhile is to have a library of "stock" mock objects. For instance, I found myself re-implementing...
4
2393
by: David Thielen | last post by:
Hi; Are there mock objects anywhere that I can use to write nunit tests for my code behind methods? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com
3
2445
by: Joe Van Dyk | last post by:
Say I've written a class that wraps around a particular (complex) communication service library. I want to unit test objects that use that communication service. Is the "best practice" to create a Communication_Service abstract base class that my Concrete_Communication_Service and my Mock_Communication_Service both inherit from? (and then use the mock service when unit testing)
2
3252
by: Terry | last post by:
I'm looking at NMock2 as a framework to create mock objects during my unit testing. One part that I'm trying to understand is that it will mock interfaces, not concrete classes. I normally don't create interfaces for every class. For example I normally don't have an interface for my business object classes. A business object class is going to have too many unique methods that I don't see the point of creating an interface that will only...
1
2253
by: earthwormgaz | last post by:
Has anyone seen a tool for C++ that automatically creates mock classes? I found MockMaker for Java, but I wondered if there was something similar for us C++ developers. The idea is to read in the interface, and then spit out a version of that that is suited to testing.
1
4084
by: lidiriel | last post by:
Hello, i would like use a mock object for testing one class and its methods: Here my class : class Foo(Component): def __init__(self): self._db = self.env.get_db() def foomethod(self, arg): .....
0
1076
by: Fuzzyman | last post by:
Mock 0.4.0 has just been released, the first release in about ten months (but worth the wait). Mock is a simple library for testing: specifically for mocking, stubbing and patching. * Mock Homepage & Documentation http://www.voidspace.org.uk/python/mock.html * mock.py (module only) <http://www.voidspace.org.uk/downloads/mock.py * mock-0.4.0.zip (module, tests and documentation) <http:// www.voidspace.org.uk/downloads/mock-0.4.0.zip
4
4966
intelrate
by: intelrate | last post by:
Here is a question. I wanted my JUnit tests to be more modular and found how to mock protected methods for that purpose. Briefly speaking, we cannot mock and control calls of protected method with JDK dynamic proxy because protected methods are not in any interface but we can create MockInterface with mock method under control and call it from overridden protected method to achieve our goal. The problem I’m trying to resolve now is that my...
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10536
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10304
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.