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

  • rekjavicxxx

    rekjavicxxx

    28 EKİM 2007
  • TastyTuts | Creative video tutorials by Gareth David

    TastyTuts |

    6 Temmuz 2011
  • Vagrant Records

    Vagrant Reco

    8 Mayıs 2006