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 "MYDOMAIN\Administrator", and an Access Denied-error for the operation that requires the elevated privileges is thrown. (I am logged in on my computer as "MYDOMAIN\Administrator")
We are expecting "i:0#.w|MYDOMAIN\Administrator", because that is what we get when running from web page.
Does anyone have a solution for this problem?