Make the User property of ApiController virtual so that it can be mocked or add a setter so that it can be setup for test.
Comments: Adding a setter and setting Thread.CurrentPrincipal in that is no the right thing as that might effect other tests. Discussed this with David and he said there is some non-trivial amount of work to make the setterworking.
Comments: Adding a setter and setting Thread.CurrentPrincipal in that is no the right thing as that might effect other tests. Discussed this with David and he said there is some non-trivial amount of work to make the setterworking.