Technorati Tags: Unit Testing,MVC,VS 2010
I have a view that really only provides content, is there a quick way to test that it exists? What’s the Assert?
There’s really not much to unit test if you have a page that has only HTML in a MVC (Model-View-Controller) project. And to some extent, if you had a test [...]
Archive for the ‘Technology’ Category
Unit Testing a Very Simple ViewResult in MVC
Filed under: Technology | Tags: MVC, Unit Testing, VS 2010
Unit Testing CodeSmith Insight
Filed under: Technology | Tags: CodeSmith, Insight, Moq, MVC, Unit Testing
Technorati Tags: Unit Testing,MVC,Moq,CodeSmith,Insight
As anyone that knows me knows, I use test driven development. So when I put together a Feedback page in my MVC (Model-View-Controller) site I started with my test. What should the test be?
Let’s start with the User Story : As a site user (anonymous or logged in) I want to submit [...]
CodeSmith Insight Overview
Technorati Tags: CodeSmith
CodeSmith Insight is a very nice tool that’s currently in Beta targeted and collecting feedback from your users… to provide you with “Insight” to your customers needs.
I’ve been beta testing this for about 1 week now and have been very impressed. I’ll put some of my findings here as well as some tips [...]
Unit Test Authorize Attribute
Filed under: Technology | Tags: ASP.NET, MVC, Unit Testing, VS 2010
Technorati Tags: Unit Testing,ASP.NET,MVC,VS 2010
Story: I want to write a unit test to ensure that the Authorize attribute is applied to a controller ActionResult or ViewResult so that security is tested.
Here is the test:
Unit Test
[TestMethod]
public void PreviousSiteUserConversion_Authorization_Attributes_Have_Been_Applied()
{
// Arrange
MethodInfo varietalMethod = typeof(AdminController).GetMethod("PreviousSiteUserConversion", new Type[] { });
// Act
var attributes = varietalMethod.GetCustomAttributes(typeof(AuthorizeAttribute), true);
// Assert
Assert.IsNotNull(attributes);
Assert.AreEqual(1, attributes.Length);
var authAttribute = (AuthorizeAttribute)attributes[0];
string[] [...]
dbboon and proxy.php broke my GoDaddy site?
Technorati Tags: Hosting
Headline: I deleted the folder and now my site works fine.
I’ve seen other posts on this, but the word I got from GoDaddy today is that this file is required for some features involving “widgets”. Since I don’t use any of those features, this file was breaking my site. I honestly don’t remember [...]
Impressed with CrystalTech for .NET 4.0
Filed under: Technology | Tags: .NET 4.0, ASP.NET, Hosting, MVC, VS 2010
Technorati Tags: .NET 4.0,Hosting,ASP.NET
I’ve used CrystalTech for years. They seemed to be falling behind a bit when I started to work with the MVC (Model-View-Controller) pattern. That works MUCH better with IIS 7 than with IIS 6, but CrystalTech only had IIS 6 servers.
That’s all changed!
I now have no excuses for not upgrading my sites [...]
My SSD Rocks
Filed under: Technology | Tags: Dell, Hardware, Intel, SSD
Technorati Tags: Intel,SSD,Dell,Hardware
Headline: My new Intel 160 GB X25M SSD (Solid State Drive) is really fast! 200+ MB/sec read and 90+ MB/sec write!
Background
I sort of smiled when I opened up my new drive this week to see a little sticker that said, “My SSD Rocks!”. You see, I had a SSD before… The original one [...]
Goodbye Groove
Filed under: Technology | Tags: Collaboration, Groove, OneNote, WHS
Technorati Tags: OneNote,Groove,WHS,Collaboration
I started using Lotus Notes in 1992… But then IBM didn’t seem to be able to market their way out of a paper bag after buying Lotus. Ray then ran off to write the next version and started Groove. I was SO disappointed when he made the same silly mistake of limiting the [...]
MVC – The Start
Filed under: Technology | Tags: ASP.NET, Code Analysis, MVC, Unit Testing
Technorati Tags: ASP.NET,MVC,Code Analysis,Unit Testing
This shows my initial setup of an MVC 2 RC 2 application. Using Visual Studio 2010 RC I selected File –> New –> Project… then under Visual C#, Web, I selected the ASP.NET MVC 2 Web Application.
Then when I click OK I get the following dialog. Since I’m a very [...]
MVC Overview
Technorati Tags: MVC
What’s different about Microsoft’s ASP.NET MVC (Model-View-Controller)?
There are some very good books about MVC (such as Steven Sanderson’s book), but here are the features I enjoy the most:
Routing – The routing model in MVC makes you really think about what you want your URLs to look like. In EVERY instance my application ended [...]