public void PutShop_givenValidData_savesChanges() { //Given ApplicationDbContext testDb = new ApplicationDbContext(); ShopsController controller = new ShopsController(testDb); //When Task<IHttpActionResult> result = controller.PutShop(0, new Shop()); //Then Console.Write("x"); }
public void GetShops_Shops_NotNull() { //Given Mock<ApplicationDbContext> applicationDB = new Mock<ApplicationDbContext>(); applicationDB.Setup(t => t.Shops).Returns(createMoqShop); ShopsController controller = new ShopsController(applicationDB.Object); //When IQueryable<Shop> shops = controller.GetShops(); //Then Assert.AreEqual(3, shops.Count()); }