The unit-testing tag has no wiki summary.
2
votes
1answer
51 views
WebClient and impersonate as other user
I created a web service hosted in SharePoint 2010 and I want to unit test its behaviour/results.
Now when I try to run a test with a different user, I always get the results of the previous user and ...
1
vote
0answers
25 views
Elevated Account during unit testing when using Claims Based Authentication
I am using SharePoint 2010 and we have switched to using Claims Based Authentication.
When I run unit tests and running code with elevated privileges the web.CurrentUser.LoginName is ...
1
vote
1answer
71 views
SharePoint and Unit Testing - problem deploying dll to be tested
I have a SharePoint 2010 project in VS 2010, and I'm trying to develop some unit tests to test my code.
I have followed all of the instructions here to prepare my VS2010 environment to re-target the ...
0
votes
0answers
141 views
Microsoft.SharePoint.Emulators - Getting ShimNotSupportedException: System.Web.HttpContext
I'm trying to use the SharePoint Emulators package for unit testing SharePoint WebParts.
However, even the simplest unit test throws the following exception:
Test Name: TestMethod1
Test FullName: ...
3
votes
2answers
135 views
Unit testing in sharepoint solution
I'm working on a sharepoint project, and the associated visual studio solution contains several projects, of which some are plain c# class libraries. I would like to unit test those projects, but each ...
0
votes
1answer
249 views
How can I test a CAML query using mocking?
I have a CAML query in a class and I'm using unit test to cover my code with some proper test. For the SharePoint classes and stuff, I use TypeMock to mock the SharePoint objects.
I would like to ...
1
vote
2answers
249 views
SharePoint 2010 Object Model using Moles Framework?
Recently I have been assigned a task to implement Unit Testing for my SharePoint object model code. I have gone through the "MSDN" reference. I am stuck now.
I would like to know the difference ...
2
votes
1answer
96 views
Using object model in automated unit test
I'm setting up a project in which I want to include a unit test project for testing. I'm testing this with the new TFS Online preview (dev 11), so I want to use a continuous build to test each ...
1
vote
0answers
153 views
SharePoint Behaved Types - Run Pex Explorations error (System.Moles 4.0.0.0)
was following a tutorial on pex and moles (http://research.microsoft.com/en-us/projects/pex/pexsharepoint.pdf). Its a year old, but everything worked fine until I changed Mole types to Behaved types. ...
6
votes
1answer
339 views
Moq'ing SharePoint for Unit tests
Everything i read about unit testing mentions TypeMock isolator. thats good when you can control what unit testing and mocking tools you are using in the project but I am unable to use TypeMock. ...
1
vote
2answers
464 views
Unit Testing / Performance Testing approaches for SharePoint Projects
Its sort of an open ended question but can anybody share the experiences, approaches, tools and infrastructure to implement following in their SharePoint Projects:
Unit Testing
Performance Testing
...
0
votes
1answer
344 views
Unit test for creating a SharePoint site fails
I have some code that creates a SharePoint site.
When the code runs as part of the solution it works. However, when I run it as a unit test I get the following error:
The test adapter ...
4
votes
3answers
663 views
Unit testing web parts
I've read the articles from Andrew Woodward (21Apps) trying to get started with unit testing on WSS, but when I try something more advanced, like Webpart connections, I don't know how to start ...

