Exemplo n.º 1
0
 public AlertsController(ICrudOnAlerts crudOnAlerts, IAuthorization authorization, IThrowExceptionToUser throwExceptionToUser, ICrudOnUsers crudOnUsers)
 {
     this.crudOnAlerts         = crudOnAlerts;
     this.authorization        = authorization;
     this.throwExceptionToUser = throwExceptionToUser;
     this.crudOnUsers          = crudOnUsers;
 }
Exemplo n.º 2
0
 public void Initialize()
 {
     TestInitialiser.Initialise();
     this.getCitiesAndCategories = TestInitialiser.ninjectKernel.kernel.Get <IGetCitiesAndCategories>();
     this.crudOnProducts         = TestInitialiser.ninjectKernel.kernel.Get <ICrudOnProducts>();
     this.crudOnAlerts           = TestInitialiser.ninjectKernel.kernel.Get <ICrudOnAlerts>();
     this.mailSender             = TestInitialiser.ninjectKernel.kernel.Get <IMailSender>();
 }
Exemplo n.º 3
0
 public CrudOnUsers(ICrudOnProducts crudOnProducts, IMailSender mailSender, ICrudOnFriends crudOnFriends, ICrudOnAlerts crudOnAlerts, DonkeySellContext context)
 {
     this.context        = context;
     userManager         = new UserManager <DonkeySellUser>(new UserStore <DonkeySellUser>(context));
     roleManager         = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(context));
     this.crudOnProducts = crudOnProducts;
     this.mailSender     = mailSender;
     this.crudOnFriends  = crudOnFriends;
     this.crudOnAlerts   = crudOnAlerts;
 }
Exemplo n.º 4
0
 public ProductsController(ILogger logger, ICrudOnProducts crudOnProducts, IAuthorization authorization, IMyQueryBuilder myQueryBuilder, ICrudOnFavorites crudOnFavorites,
                           IThrowExceptionToUser throwExceptionToUser, IMailSender mailSender, ICrudOnAlerts crudOnAlerts)
 {
     this.logger               = logger;
     this.crudOnProducts       = crudOnProducts;
     this.authorization        = authorization;
     this.myQueryBuilder       = myQueryBuilder;
     this.crudOnFavorites      = crudOnFavorites;
     this.throwExceptionToUser = throwExceptionToUser;
     this.crudOnAlerts         = crudOnAlerts;
     this.mailSender           = mailSender;
 }
Exemplo n.º 5
0
        public void Initialize()
        {
            TestInitialiser.Initialise();
            crudOnAlerts = TestInitialiser.ninjectKernel.kernel.Get <ICrudOnAlerts>();
            crudOnUsers  = TestInitialiser.ninjectKernel.kernel.Get <ICrudOnUsers>();
            var viewUser = TestInitialiser.CreateUser();

            user = crudOnUsers.CreateOrUpdateUser(viewUser).Result;
            var viewAlert = new ViewAlert()
            {
                ProductName = productName, UserId = user.UserId
            };

            alert = Mapper.Map <Alert>(viewAlert);
        }
 public ProductEmailNotifications(ICrudOnAlerts crudOnAlerts, IMailSender mailSender)
 {
     this.crudOnAlerts = crudOnAlerts;
     this.mailSender   = mailSender;
 }