Category Archives: typemock

Battle of the framework: Testing a Webpart

Time to see the difference between Moles and Isolator code. Let’s start with the code under test (a webpart): public class NewMessagesCountWebPart : WebPart{    private Label lblNewMessages;    protected void CreateChildControls(int i)    {        CreateChildControls();    }       protected override void CreateChildControls()    {        lblNewMessages = new Label();        lblNewMessages.Text = GetMessageNumberText();        this.Controls.Add(lblNewMessages);        base.CreateChildControls();    }    private string GetMessageNumberText()    {        using (SPSite site = new SPSite(“”))        {            using (SPWeb web

Read More

Battle of the frameworks: The SharePoint arena

Last week, I gave a presentation at the Israeli SharePoint user group on unit testing SharePoint applications. Slides below. Me closer (lurking in the shadows). As an objective observer, I compared the two and only alternatives for Isolation frameworks for SharePoint: Typemock Isolator and Microsoft Moles. And here’s my objective decision: Isolator wins by a

Read More

Webcast Story

Let’s see – how did we get here? It was in October 2009. We were planning to go the SharePoint conference, and got a video camera. On the spur of the moment, Roy said: why don’t we do a webcast? And that’s how “This week in testing” came out to be. One shot recording, upload,

Read More