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

  • boogie2988

    boogie2988

    6 NİSAN 2006
  • Capcom Unity

    Capcom Unity

    5 NİSAN 2010
  • Shameless Maya

    Shameless Ma

    24 Mayıs 2012