Esempio n. 1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     kernel             = NinjectKernel.CreateKernel();
     Current.MainWindow = kernel.Get <MainWindow>();
     Current.MainWindow.Show();
 }
Esempio n. 2
0
        public void VerfifyNinjectBindings()
        {
            //Arrange
            var exceptions = new List <string>();
            var kernel     = NinjectKernel.CreateKernel();
            var bindings   = GetBindings(kernel);

            //Act
            foreach (var t in bindings)
            {
                try
                {
                    kernel.Get(t);
                }
                catch (Exception ex)
                {
                    exceptions.Add(ex.Message);
                }
            }
            //Assert
            exceptions.Should().BeEmpty();
        }