Had a problem mocking a call to SPWorkflowActivationProperties.Item today. Turns out to be a bug in the TypeMock library. Problematic unit test [Test, Isolated] public void PublishToExternalDocumentLibrary_Calls_CopyTo_Correctly() { ApprovalWorkflow approvalWorkflow = Isolate.Fake.Instance<ApprovalWorkflow>(Members.CallOriginal, ConstructorWillBe.Called); SPWorkflowActivationProperties activationProperties = Isolate.Fake.Instance<SPWorkflowActivationProperties>(Members.CallOriginal, ConstructorWillBe.Called); SPListItem item = Isolate.Fake.Instance<SPListItem>(); Isolate.WhenCalled(() => approvalWorkflow.PublishWhenComplete).WillReturn(true); Isolate.WhenCalled(() => approvalWorkflow.PublishDocumentLibraryUrl).WillReturn(ExternalDocumentLibraryUrl); Isolate.WhenCalled(() => approvalWorkflow.WorkflowActivationProperties).WillReturn(activationProperties); Isolate.WhenCalled(() => activationProperties.Item).WillReturn(item); Isolate.WhenCalled(() [...]
Posts Tagged ‘unit testing’
Typemock: System.NotSupportedException: Cannot dynamically create an instance of System.Void.
Posted in unit testing, tagged unit testing, typemock on April 19, 2010 | Leave a Comment »
Unit testing for SharePoint
Posted in sharepoint, unit testing, tagged sharepoint, unit testing on December 4, 2008 | Leave a Comment »
Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here. The first 50 bloggers who blog this text in their blog and tell us about [...]
WatiN supports Firefox!
Posted in testing, tagged testing, unit testing, watin on June 3, 2008 | 1 Comment »
Back in March I finished developing a release of the WatiN framework that enabled testing in Firefox in addition Internet Explorer (already supported). This was the first time I’ve been involved in collaborative open source development. I worked with Jeroen van Menen, the creator of the WatiN project using Basecamp for project management and sourceforge [...]