Articles : Page 1 of 1
-
Hey .NET Developers! Its Christmas All Over Again!
Jan 1114Today was a great day to be a .NET developer. I felt like a five year old on Christmas morning. I had that feeling you get when you just finished opening all your gifts and you are not sure what you want to play with first. Just in case you are living under a rock, here is a quick summary of what I found under the Christmas tree today. MVC 3 – Its Finally Here Today MVC3 with Razor was released. This means that we can finally avoid paying the angle bracket tax. The new razor syntax will mak...
-
These Times, They Are A-Changin
Oct 1020Warning, serious rant ahead, get yourself a cup of coffee and relax... C# has been my bread and butter for quite some time, and before that it was Delphi. And you know what, I loved Delphi. It was a powerful language, one which was fast and relatively easy to develop in. I wrote Delphi code for years and enjoyed it. As the .NET platform was taking off I started to take a serious look at C# because it seemed like the most obvious jump from Delphi for what we were doing, which was writing Wind...
-
Unit Testing Secure Controller Actions with Moq
Aug 1015One of the hardest things to unit test in MVC is security. Security is tough to test because there is a lot of setup involved in mocking the HttpContext, the Principal and the Identity. For example, in WeBlog I am using the following code in the Edit Post action. Post post = Repository.FirstOrDefault<Post>(x => x.ID == id); if (post == null) return View(NotFound if (!HttpContext.User.CanEditPost(post)) return View(PermissionDenied In order to make sure this code works properly I need to t...
- 1

