Creating Test 1

In our FizzBuzzController. The first pattern is Red, means our code must failed first.

public ActionResult Index(int value)
{
    return View();
}

Build and run the test. It shows red. Now, we develop our code in order to make it pass the test.

public ActionResult Index(int value)
{
    ViewBag.Output += "1";
    return View();
}

Rebuild and run the test again, make sure it will give green light.

results matching ""

    No results matching ""