Tags » TDD

Example test your controller, Nunit test

for you home controller:

using System.Web.Mvc;

namespace WestBanking.Controllers
{
    public class HomeController : Controller
    {
       

        public ActionResult Index()
        {
            return Redirect("http://netbank.test.com");
        }
    }
}

here is your test… 35 more words

C#

Example of using moq in your nunit test

When you do unit test, we won’t use the real server to do the test, the moq package could help us do the dependence inject. 177 more words

Tdd

Write your first Unit test - Test your model

For example you have very simple code like this:

namespace WestBanking.Models
{
    public class CheckCredit: ICreditChecker
    {
        public bool IsCreditWorthy(int credit)
        {
            // Simulate actual credit check

            if (credit<200)
            {
                return false;
            }

            return true;
        }
    }
} 55 more words
Tdd

Nunit test in Visio Studio - Set up - To be continue

Recently my job need write all the unit test for my project and I haven’t done this before, and I like share my experience here, and hope that could help someone else. 45 more words

C#

Katas!

In the recent month or two, I have been doing a lot of code-katas. This in connection with the project I’m in, which is using Test Driven Development as the development method. 145 more words

C#

SPOEmulators 0.2-pre released on nuget

I had no support for Visual Studio 2015 in my first beta. I fixed this and added a pester test script to test the init.ps1. 74 more words

SharePoint

Template Method or Dependency Injection?

Mystical

Dependency Injection used was always¬†something very mystical to me. Until I learned what it’s really about.

I’d like to share this revelation with you.¬† 1,078 more words

Programming