one of the “hidden” features in the latest typemock release is the fact that the Intellitest suggestion engine is extensible. I was easily able to add suggestions to create fake objects using another framework. here’s what the code to create an ISuggestionProvider looks like: and here’s what it looks like in visual studio: and selecting …
Tag Archive: Advanced
Permanent link to this article: http://www.typemock.com/blog/2009/10/29/creating-an-intellitest-suggestion-in-5-minutes/
Apr
04
Feature Preview: Custom Argument Checking with Argument Placeholders
Our very own Roy Osherove posted a glimpse of a feature we’re planning to release in our next Isolator version – custom argument checkers in AAA. This feature will allow you to fake behavior conditionally; Argument placeholders are passed into the faking statement, and later used to specify a user provided delegate that defines the …
Permanent link to this article: http://www.typemock.com/blog/2009/04/04/feature-preview-custom-argument-checking-with-argument-placeholders/
Jul
23
Is the visibility of tested methods important?
We are having quite a discussion lately within Typemock about the importance of the visibility of tested methods. For example, should it really be harder to test a private method? If it is harder, then many developers will opt to change the scope of the tested method to public, even if business wise, it should …
Permanent link to this article: http://www.typemock.com/blog/2008/07/23/is-the-visibility-of-tested-methods-important/
Jul
16
Mocking asynchronous actions with Typemock Isolator
Here is an answer to a question that keeps popping up every once in a while: how do you stub out asynchronous actions in your class under test? Assuming that you can’twon’t change the code and refactor it (usual case in most legacy systems), here is a class with an async action you’d like to …
Permanent link to this article: http://www.typemock.com/blog/2008/07/16/mocking-asynchronous-actions-with-typemock-isolator/
Jul
15
Configuration via Typemock Interception
A while ago Udi Dahan wrote that he’d like a way to configure objects by just setting property values on an object. those “setters” will be intercepted and saved to a some config object (or container) for the future use of the application. Udi turned to me a while ago and asked if perhaps typemock …
Permanent link to this article: http://www.typemock.com/blog/2008/07/15/configuration-via-typemock-interception/
Jun
02
More on Using Marshal.GetExceptionCode()
A long time ago Ayende pointed out that GetExcpetionCode can be used to know whether an exception was thrown from inside a finally clause. We have found this technique also useful (thank you Ayende) from inside a Dispose method. However, we also needed to know the exception type that was thrown and this apparently is …
Permanent link to this article: http://www.typemock.com/blog/2008/06/02/more-on-using-marshal-getexceptioncode/
Apr
10
Argument Checking
One common use of a mocking framework is to check interaction between classes, Specifically checking correct arguments passing between calls. Like any other framework Typemock Isolator also contain such an ability: using (RecordExpectations recorder = RecorderManager.StartRecording()){ MyClass mock = new MyClass(); mock.DoStuff(5); recorder.CheckArguments();} However when doing so its important to note that the verification is …
Permanent link to this article: http://www.typemock.com/blog/2008/04/10/argument-checking/
