vendredi 8 mai 2015

Unit Testing is not showing Test Result

I have create one Unit Test Project where I am testing my View but it is not showing any result. Below is my Code:-

using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SinglePage.Controllers;
using System.Web.Mvc;

namespace UnitTestProject1
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            Console.WriteLine("METHOD");
            //Arrange
            HomeController ctrl = new HomeController();

            Console.WriteLine("Pass");
            //Act
            ViewResult r = ctrl.Index() as ViewResult;

            //Asert
            Assert.AreEqual("View1", r.ViewName);
        }

    }
}

After click on "Run All" from Test Explorer I am getting below message:

------ Discover test started ------

No plugin found which can import settings file with extension '.csproj'. Either select a new settings file or install an extension which understands this settings file extension.

========== Discover test finished: 0 found (0:00:00.0010094) ==========

Aucun commentaire:

Enregistrer un commentaire