public SupplierController(IStreinger streinger, SuppliersContext suppliersContext, UserManager <User> userManager) { _streinger = streinger; _suppliersContext = suppliersContext; _userManager = userManager; }
public void SetUp() { var goods = new Good[] { new Good() { Product = new Preparation() { Name = "hello_world" }, Supplier = new Supplier() { Company = "company" } } }.AsEnumerable(); var strngr = new Mock <IStreinger>(); strngr.Setup(ex => ex.Goods()).Returns(Task.FromResult(goods)); strngr.Setup(ex => ex.Goods(It.IsAny <string>())).Returns(Task.FromResult(goods)); strngr.Setup(ex => ex.Goods("NOT_EXISTS")).Returns(Task <IEnumerable <Good> > .FromResult((IEnumerable <Good>)null)); this.strngr = strngr.Object; }
public void SetUp() { var strngr = new Mock <IStreinger>(); strngr.Setup(ex => ex.Goods()).Returns(Task.FromResult(new Good[] { new Good() }.AsEnumerable())); strngr.Setup(ex => ex.Goods(It.IsAny <string>())).Returns(Task.FromResult(new Good[] { new Good() }.AsEnumerable())); this.strngr = strngr.Object; }
public AdminController(UserManager <User> userManager, RoleManager <IdentityRole> roleManager, SuppliersContext suppliersContext, MessengerContext messengerContext, IStreinger streinger) { _streinger = streinger; _userManager = userManager; _messengerContext = messengerContext; _roleManager = roleManager; _suppliersContext = suppliersContext; }
public SearchController(IStreinger streinger, ITopAlgorithm topAlgorithm) { this._streinger = streinger; _topAlgorithm = topAlgorithm; }
public AjaxController(IStreinger streinger) { this._streinger = streinger; }
public Recommender(IStreinger streinger) { this._streinger = streinger; }
public ProductController(IStreinger streinger, IRecommender recommendator) { this._streinger = streinger; this._recommendator = recommendator; }