Unable to unit test a .aspx.cs code when using App_GlobalResources folder

I've been working on some unit tests for a project, and encountered an issue when trying to test a web page using global resource files. Found a blogpost by Scott Allen on the subject, which partly solved it: http://odetocode.com/Blogs/scott/archive/2009/07/16/resource-files-and-asp-net-mvc-projects.aspx.

But when I followed it, the code (shown below) in the .aspx couldn't find the correct resource:

AlternateText="<%$Resources: WebResources, atImageCantBeDisplayed %>"

Haven't found a solution on how to utilize this convention with embedded resource files.

Tips? Tricks? Hacks? Finding it strange that it's so much hazzle to debug a test using global resources folder, shouldn't this just work "out of the box"? Or have I just become to lazy..

Answers


Need Your Help

Create Item and add images for Item in one step

c# asp.net-mvc asp.net-mvc-4

I am trying to learn ASP.net by making an e-commerce site. I am trying to set up the ability to create Items and assign Images to the item being created via File Upload.

C++ type conversion

c++ string integer types

Where can I find an overview of type conversion, e.g. string to integer, etc.?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.