Moving to New Office
We have moved to our new offices. We are having a great time here. Here are some photos from the office and our ”Official Opening Party”
Boxes of new hardware
Amir and Efi Working…

Mingling
Ohad, Gil and Lior
Ram and Yuval Neeman
We did have wine and whisky…
The TypeMock Experience
And here is a good one of me.
Going to TechEd Europe
We are going to TechEd Barcelona, although we don’t have a booth we going to have a TypeMock group meeting. The event will be announced (place and time) later on.
If you wish to meet, please send your contact details.
The Ultimate Proof for TypeMock
When developer using TypeMock find it an indispensable tool, it is a sign that we really help ease the task of building lasting software.
The best way to see if you need something is to stop using it (or be prevented from using it) for a while and see if you reach out for it out of habit….
I quickly realized that TypeMock.NET had become such an important part of my testing process that I could no longer function without it. It is an indispensable tool and while I acquired another Mock tool I simply can’t do without TypeMock.NET.
Mocking Extension Methods
With Orcas and TypeMock 4.1 you can now mock Extension methods, easily.
Suppose we added a new method to int that return the Roman Number equivalent of that number:
public static class Extend { public static string RomanNumber(this int number) { // do complex logic return romanString; } }
Now we use this method in our code
string romanNumber = 2010.RomanNumber();
Here is how we mock this.
Reflective Mocks (Community Edition)
We mock that actual static extension method
Mock extentionMethodMock = MockManager.Mock(typeof(Extend)); extentionMethodMock.ExpectAndReturn("RomanNumber","MCMLIX");
Natural Mocks (Professional Edition)
We just call the extension method
using (RecordExpectations rec = new RecordExpectations()) { rec.ExpectAndReturn( 2010.RomanNumber(), "MCMLIX"); }
Checking Arguments
Care should be taken when Checking Arguments as the first argument is the instance of the type we are extending, suppose the extension method takes another argument
public static class Extend { public static string RomanNumber(this int number, bool upperCase) { // do complex logic return romanString; } }
Here is how we validate the arguments.
Reflective Mocks (Community Edition)
We have to implicitly ignore the first argument
// first arg is instance, second must be false Mock extentionMethodMock = MockManager.Mock(typeof(Extend)); extentionMethodMock.ExpectAndReturn("RomanNumber","MCMLIX"). Args(Check.IsAny(),false);
Natural Mocks (Professional Edition)
TypeMock automatically handles the first argument
using (RecordExpectations rec = new RecordExpectations()) { // TypeMock knows that this is an extension method and ignores first
// argument automatically rec.ExpectAndReturn( 2010.RomanNumber(false), "MCMLIX") .CheckArguments(false); }
DotNetRocks Interview
I had a real fun talk with Richard and Carl on DotNetRocks. You can listen to the show here.
The highlight was a grand piano being delivered to Carl during the interview.
Although the show was mainly targeted at Dependency Injections, there are many other design issues that are not required because TypeMock is design agnostic. One is the unnecessary need for virtual method Take a look at Jeremy’s post for more details.
NCover 2.0
Peter Waldschmidt has announced the release a new commercial version of NCover. NCover is now developed in a new company called Gnoso. The new NCover is a complete Code Coverage Solution and combines Grant Drake’s NCoverExplorer
To use NCover 2.0 with TypeMock.NET, you will need to install TypeMock version 4.1. This now includes a option to link with NCover 2.0.
Now with Ncover 2.0 and TypeMock you can test and measure your 64 bit code! Both tools support 64 bit architectures and are integrated together.
Remember that all .NET 2.0+ code will run automatically in 64 bit and all .NET 1.1 code will always run in 32 bit mode.
To run .NET 2.0+ code in 32 bit, you must set the 32 bit flag of the executable.
Here is how:
corflags.exe /32BIT+ <path-to-executable>
Jamie has already created a TestDriven.Net version (2.9) that combines NCover 2.0 and TypeMock when running your tests.
TypeMock 4.1 Released
Syndicated from the TypeMock Announcement Forum.
We have released TypeMock 4.1.
A few of the new features included in this release are:
Support of .NET 3.5 syntax changes
- Mocking automatic properties.
- Mocking Anonymous Types.
- Mocking Lambda Expressions.
- Verifying New Initialziers.
- Mocking Extension Methods.
- Mocking LINQ statements.
Integration API for tools developers
New API was released to ease integrating TypeMock with other developer tools.
Tracer Enhancement (Professional Editions)
The tracer tool has been enhanced with the ability to pause and resume trace gathering, the ability to resize its different panes, and the marking of the start and end of each test.
NCover 2.0 Support (Professional Editions)
The new release of NCover tool (2.0.1) is now supported and can be linked to run with TypeMock
Support of Visual Studio Orcas Beta 2
TypeMock.NET can be run on Visual Studio Orcas Beta 2.
Many fixes
More information can be found in the Release Notes
Recent Posts
- Product Status Peek – 2011
- Thanks Roy
- Typemock starts 2011 in a new location
- Agile Demos Smells
- I want loud disputes in our meetings
Categories
- .NET Tests
- Agile
- Code Integrity
- Community
- Debugging
- Fun
- Management for Geeks
- Marketing
- Product
- Release
- Reviews
- SharePoint
- TDD
- Time Management
- Uncategorized
- Unit Tests
Archives
- January 2011
- December 2010
- October 2010
- August 2010
- May 2010
- April 2010
- March 2010
- February 2010
- December 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- December 2008
- November 2008
- August 2008
- July 2008
- May 2008
- April 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
