Exemple #1
0
 public void Details_By_StoreId()
 {
     using (var context = new ApplicationDbContext(options))
     {
         var dataProtectionProvider = new EphemeralDataProtectionProvider();
         storeController = new StoresController(context, dataProtectionProvider, mockHttpContextAccessor.Object, mockEnvironment.Object);
         var resultTask = storeController.Details(1);
         resultTask.Wait();
         Assert.IsNotNull(resultTask.Result);
         var model = (Tuple <IList <Product>, Store>)((ViewResult)resultTask.Result).Model;
         Assert.AreEqual(1, model.Item2.StoreId);
     }
 }