Community Blogs

Browse by Tags

Related Posts

  • Unit Tests without leaving the keyboard

    I like the Roy Osherove blog: Five Whys , Leadership in software teams. Follow up on those two posts “ How to measure programmer productivity using TDD Katas ” or “ Be Productive and Go Mouseless ”. I would like to share a little keyboard shortcut which save me quite some time on my daily developments. As you might know I am a fan of ReSharper and when I am doing Test Driven Development I hate having to switch from keyboard to mouse to run the test I just wrote. So searching for ReSharper Keyboard command I found Resharper_UnitTest_ContextRun which I assign to the Ctrl+Shift+< . Now I can run the unit test I just wrote with just a combination of keys which are really near to each other so really easy! The bonus of this command is that if...


  • Shrinkr - Url Shrinking Service Developed with Entity Framework 4.0, Unity, ASP.NET MVC And jQuery (Part 2)

    In the previous post we have created our initial domain model, in this post I will show you how the domain model  is mapped to database with Entity Framework 4.0. But before that I would like to discuss how I usually structure the Visual Studio Projects. Most often I prefer to have a one class library and one web project where each has its own unit test project and only one integration test project, for example: Shrinkr.Core Shrinkr.Core.UnitTest Shrinkr.Web Shrinkr.Web.UnitTest Shrinkr.IntegrationTest The Core Project is then further divided into following folders: Shrink.Core Common (Utility, Invariant etc etc) EntityObjects (Contains both domain objects and DTOs) Extensions (Extension methods) Repositories (Contains both interface and...


  • Shrinkr - Url Shrinking Service Developed with Entity Framework 4.0, Unity, ASP.NET MVC And jQuery (Part 1)

    Creating a full blown url shrinking service was pocking around in my mind for quite some time(of course by using Twitter). Since I heard quite a few good things on Entity Framework 4.0, so I decided to start with it. The first thing I usually do when developing an application is creating the domain model. But to create the domain model, we first have to define the basic functionalities: The system will only use Open ID for authentication. User should be able to shrink url without logging in. When shrinking url, user should be able to specify alias, if alias is not specified, the system will auto generate it. Shrinked url will also have a associated webpage preview image. The system will maintain statistic of shrinked url like number of visit...


  • Moq – ToString() Method Pitfall

    I was working on some code today, when run into a pitfall with Moq. This was probably my misreading of documentation. The component I was testing looked somewhat like the code below public class SomeOtherType { private readonly ISomeType someType; public SomeOtherType( ISomeType someType) { this .someType = someType; } public string Do() { return "And it was: " + someType.ToString(); } } where dependency in injected and .ToString() method is invoked on it to construct the final result. Specification looked quiet simple [ Concern ( typeof ( SomeType ))] [ TestFixture ] public class ToStringMoqIssue : StaticContextSpecification { private Mock < ISomeType > dependency = new Mock < ISomeType >(); private string result; protected...
    Posted Aug 05 2009, 12:53 AM by ASP.NET Weblogs
    Filed under: , ,


  • Introduction to Test-Driven Development with ASP.NET MVC

    One of the greatest advantages of ASP.NET MVC is the support of testability, which enables to develop Test-Driven Development (TDD) in an easy manner. A testable application should be developed in a loosely coupled manner so that you can test the independent parts of the application. For developing testable applications, the support of developer frameworks is very important and the frameworks should be designed to facilitate building testable applications. One of the design goals of ASP.NET MVC was testability so that you can easily develop testable application with the ASP.NET MVC framework. In this post, I will give an introduction to Test-Driven Development (TDD) with ASP.NET MVC using NUnit unit test framework. Introduction to Test-Driven...


  • Book Review: ASP.NET MVC in Action

    I've had the pleasure of being able to review ASP.NET MVC in Action in it's early access form. If you've not heard of this program, Manning has a program called MEAP (Manning Early Access Program) which allows you to purchase the book before it's published and gain access to it in PDF form as the author makes the chapters available. In this case, I've been reading parts of the book nearly a year before it will be physically published in Sept 2009. I highly recommend checking that out, as I've participated...( read more ) Read More...


  • Quick Hints: Solving VS 2010 Beta1 only showing Splash Screen; AnkhSVN works; R# in June

    Check the add-ins you installed before Visual Studio 2010 if you enabled VS 2010 integration in them. Particularly TestDriven.NET is the problem. Go to “Add Remove Programs” / “Programs and Features”, find Test Driven.NET, click “Change”, and then modify it to remove VS2010 integration from it.   Also, if you are using AnkhSVN, make sure to download a new latest daily update build and use that, otherwise, you’ll get an exception when starting VS 2010.   I’ll be writing more about VSTS 2010 and .NET 4.0 in the next coming months (if God will), since now I can run it :D (before, I did not have the fix that extends the Virtual Machine expiration after January 1st, 2009).   BTW, for R# deep lovers (like me), Resharper for VS 2010...


  • Unit Testing ASP.NET? ASP.NET unit testing has never been this easy

    Unit Testing ASP.NET? ASP.NET unit testing has never been this easy. Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers. The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator , a unit test tool and Ivonna , the Isolator add-on for ASP.NET unit testing , for a bargain price. Typemock Isolator is a leading .NET unit testing tool (C# and VB.NET) for many ‘hard to test’ technologies such as SharePoint , ASP.NET , MVC , WCF , WPF, Silverlight and more. Note that for unit testing Silverlight there is an open source Isolator add-on called SilverUnit . The first 60 bloggers who will blog this...


  • Unit Testing JavaScript with FireUnit

    I’ve been investigating different unit testing frameworks for JavaScript lately and I stumbled onto FireUnit. FireUnit is a unit testing framework created by John Resig (of well-deserved jQuery fame) and Jan Odvarko. In this blog entry, I provide a brief Read More......( read more ) Read More...


  • TDD Tests are not Unit Tests

    The motivation for this blog entry is to explain the nature and purpose of the tests used in Test-Driven Development. To avoid confusion, I’ll use the expression TDD test to refer to the type of test used in the context of Test-Driven Development. The Read More......( read more ) Read More...


Page 1 of 17 (161 items) 1 2 3 4 5 Next > ... Last »
Microsoft Communities