title: Unit Testing ASP.net Web Site Project code stored in App_Code
body: <p>I have an ASP.net Web Site Project (.net 3.5). Currently all of the non-code behind code files (including Linq2Sql stuff, data contexts, business logic, extension methods, etc) are located in the App_Code folder.</p>
  
  <p>I am interested in introducing Unit Testing (using nunit) in at least some sections of the project moving forward. Any Unit Testing that I would be doing would need to have full access to all of the code that is currently located in the App_Code folder. I have done some initial reading so far, and the consensus seems to be:</p>
  
  <ul>
  <li>This will not be possible given my current setup</li>
  <li>Unit testing requires referencing classes that are part of a compiled dll, and a Web Site Project by definition only compiles at run time.</li>
  <li>In order to proceed, I will need to either convert my entire project to a Web Application, or move all of the code that I would like to test (ie: the entire contents of App_Code) to a class library project and reference the class library project in the web site project. Either of these will provide access to the classes that I need in compiled dll format, which will allow me to Unit Test them.</li>
  </ul>
  
  <p>Is this correct? Or is there another way that I can Unit Test without restructuring/refactoring my entire project?</p>