public BoundaryTest() { /// <summary> /// Injecting service object into Test class constructor /// </summary> _groceryS = new GroceryServices(groceryservice.Object); _userGroceryS = new UserGroceryServices(userservice.Object); _user = new ApplicationUser() { UserId = "5f45df48ff7f1df2085ec8fd", Name = "Uma Kumar", Email = "*****@*****.**", Password = "******", MobileNumber = 9865253568, PinCode = 820003, HouseNo_Building_Name = "9/11", Road_area = "Road_area", City = "Gaya", State = "Bihar" }; _product = new Product() { ProductId = "5f45df48ff7f1df2085ec8fd", ProductName = "Samsung", Description = "Procesor i9, 2 GB, 32 GB SSD, Corning Grollia Glass", Amount = 24900.0, stock = 10, photo = "", CatId = 1 }; _category = new Category() { Id = "5f0ff60a7b7be11c4c3c19e1", CatId = 1, Url = "~/Home", OpenInNewWindow = false }; _productOrder = new ProductOrder() { OrderId = "5f48bf68c558892d2e17a70c", ProductId = "5f45df48ff7f1df2085ec8fd", UserId = "5f4f6639016adae865d627ff" }; }
/// <summary> /// Injecting referance variable into UserController constructor /// </summary> public UserController(IUserGroceryServices userGroceryServices, IAdminGroceryServices adminGroceryServices) { _userGS = userGroceryServices; _adminGS = adminGroceryServices; }
/// <summary> /// Injecting referance variable into GroceryController constructor /// </summary> public GroceryController(IGroceryServices groceryServices, IUserGroceryServices userGroceryServices) { _groceryServices = groceryServices; _userGroceryServices = userGroceryServices; }