The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Mock objects and unit testing
Replies: 6   Last Post: Apr 23, 2014 11:26 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 1
Registered: 2/10/09
Mock objects and unit testing
Posted: Feb 10, 2009 3:40 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

, I'm trying to write unit tests for my MATLAB code base. I've written a fair number of classes, and I have a number of them set up with unit tests using mlunit. Unfortunately, it's come time to try and test some of the the inner parts of my object graph, and to try to minimize the dependency of these tests on other objects, I want to mock out some of the objects.

Unfortunately, it appears the MATLAB does not support private classes. Ideally, I'd be able to write these classes into the same files as the tests I'm writing, since they're (by definition) going to be barebones. Has anybody else done this? If so, how did you do your mocks?

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.