private void AddBindings()
        {
            kernel.Bind<IOrdersRepository>().To<OrdRepository>();
            Mock<IOrderRepository> mock = new Mock<IOrderRepository>();
            mock.Setup(m => m.Order).Returns(
                new Order() {
                    Countries = new List<SelectListItem>
                    {
                        new SelectListItem {Value = "1", Text = "USA"},
                        new SelectListItem {Value = "2", Text = "Canada"},
                        new SelectListItem {Value = "3", Text = "Brazil"}
                    }
            });
            kernel.Bind<IOrderRepository>().ToConstant(mock.Object);

            EmailSettings emailSettings = new EmailSettings
            {
                MailToAddress = ConfigurationManager.AppSettings["Email.MailToAddress"],
                MailFromAddress = ConfigurationManager.AppSettings["Email.MailFromAddress"],
                UseSsl = bool.Parse(ConfigurationManager.AppSettings["Email.UseSsl"]),
                Username = ConfigurationManager.AppSettings["Email.Username"],
                Password = ConfigurationManager.AppSettings["Email.Password"],
                ServerName = ConfigurationManager.AppSettings["Email.ServerName"],
                ServerPort = int.Parse(ConfigurationManager.AppSettings["Email.ServerPort"])
            };

            kernel.Bind<IOrderProcessor>().To<MailOrderProcessor>()
                .WithConstructorArgument("settings", emailSettings);

            kernel.Bind<ISaveOrderProcessor>().To<SaveOrderProcessor>();
        }
 public MailOrderProcessor(EmailSettings settings)
 {
     emailSettings = settings;
 }