SORU
19 AĞUSTOS 2013, PAZARTESİ


Test yöntemi yetersizdir: Test edilmedi't çalıştırın. Hata mı?

Test Dersim var ve test sınıfından örnek bir test attılar aşağıda

namespace AdminPortal.Tests.Controller_Test.Customer
{
    [TestClass]
    public class BusinessUnitControllerTests
    {
        private IBusinessUnitRepository _mockBusinessUnitRepository;
        private BusinessUnitController _controller;

        [TestInitialize]
        public void TestInitialize()
        {
            _mockBusinessUnitRepository = MockRepository.GenerateMock<IBusinessUnitRepository>();
            _controller = new BusinessUnitController(_mockBusinessUnitRepository);
        }

        [TestCleanup]
        public void TestCleanup()
        {
            _mockBusinessUnitRepository = null;

            _controller.Dispose();
            _controller = null;

        }

        #region Index Action Tests
        [TestMethod]
        public void Index_Action_Calls_GetAllBusinessUnit()
        {
            _mockBusinessUnitRepository.Stub(x => x.GetAllBusinessUnit());

            _controller.Index();

            _mockBusinessUnitRepository.AssertWasCalled(x=>x.GetAllBusinessUnit());
        }
    }
}

Ekran aşağıdaki ben projeyi çalıştırdığımda enter image description here

Referansları kontrol ve test proje ana proje başvurusu var. Testi ya da yetersiz olduğunu söyleyerek, neden herhangi bir fikir?

Edit 1:

Post here gördüm ve X 64 için benim test ayarı varsayılan işlemci mimarisi değişti ama hala çalışmıyor.

CEVAP
27 Ocak 2014, PAZARTESİ


Her ihtimale karşı yukarıdaki seçeneklerden hiçbiri benim App bozuk bir giriş fark ederek bu hatanın benim örnek hazırladım herkes için çalıştı.Yapılandırma projesinin eksik nuget paketi nedeniyle.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Dumb Stupid Videos

    Dumb Stupid

    26 Kasım 2013
  • katherine gomez

    katherine go

    1 Aralık 2011
  • The Platform

    The Platform

    14 HAZİRAN 2006