Exemplo n.º 1
0
        public static StructureMap.Registry GetStandardRegistry()
        {
            var registry = new StructureMap.Registry();

            registry.IncludeRegistry <DelegateRegistry>();
            return(registry);
        }
        protected TestContainer()
        {
            var registry = new Registry();

            registry.IncludeRegistry <SeleniumRegistry>();
            _container = new Container(registry);
        }
Exemplo n.º 3
0
    public void _Inline_Setter_Should_Populate_Multiple_Implementations()
    {
        //Arrange
        var registry = new StructureMap.Registry();

        registry.IncludeRegistry <ContainerRegistry>();
        // build a container
        var container = new StructureMap.Container(registry);

        //Act
        var target = container.GetInstance <IMeasurementContractsApplication>();

        //Assert
        target.Should().NotBeNull();
        target.DistributionListProvider.Should().BeOfType <DistributionListProvider>();
        target.FirstDeliveryNoticeDocumentRecallProvider.Should().BeOfType <FirstDeliveryNoticeDocumentAdminUpdateProvider>();
    }
        public void _Inline_Setter_Should_Populate_Multiple_Implementations()
        {
            //Arrange
            var registry = new StructureMap.Registry();

            registry.IncludeRegistry <ContainerRegistry>();
            // build a container
            var container = new StructureMap.Container(registry);

            //Act
            var application = container.GetInstance <IMeasurementContractsApplication>();

            //Assert
            application.Should().NotBeNull();
            application.Foo.Should().BeOfType <Foo>();
            application.Bar.Should().BeOfType <Bar>();
        }