public void tewwet()
{
var productRepository = new Moq.Mock<IProductRepository>();
productRepository.Setup(x => x.Get())
.Returns(new[]
{
new Product()
{
ID = 1,
Title = "iPad",
Description = "Fruit based tablet",
UnitPrice = 450
},
new Product()
{
ID = 2,
Title = "iPhone",
Description = "Fruit based phone",
UnitPrice = 500
}
});
var homeController = new HomeController(productRepository.Object);
var result = homeController.Index() as ViewResult;
Assert.NotNull(result.Model);
}