Esempio n. 1
0
        public void ConfigurationIsValid()
        {
            // Arrange & Act
            GreenfieldBootstrapper.SetupAutoMapping();

            // Assert
            Mapper.AssertConfigurationIsValid();
        }
Esempio n. 2
0
        public void ShouldMapOrderWithRowsMapped()
        {
            // Arrange
            GreenfieldBootstrapper.SetupAutoMapping();
            var order = Builder <Order> .CreateNew()
                        .With(order1 => order1.Rows = Builder <OrderRow> .CreateListOfSize(5).Build())
                        .Build();

            // Act
            var vm = Mapper.Map <OrderVm>(order);

            // Assert
            Assert.AreEqual(vm.Rows.Count, order.Rows.Count);
        }
Esempio n. 3
0
 protected override void ConfigureApplicationContainer(IKernel existingContainer)
 {
     GreenfieldBootstrapper.SetupAutoMapping();
     GreenfieldBootstrapper.SetupNinjectGlobalScope(existingContainer);
 }
Esempio n. 4
0
 protected override void ConfigureRequestContainer(IKernel container, NancyContext context)
 {
     GreenfieldBootstrapper.SetupNinjectRequestScope(container);
 }