public void Should_detect_attributes_derived_from_RequiresHostingExtension()
 {
     RequirementDetector
     .GetRequiredHostExtensions(new Application())
     .Should()
     .ContainSingle()
     .Which.Type.Should()
     .Be <IGenericInterface <string> >();
 }
        public void Should_detect_attributes_from_static_property_of_base_class()
        {
            var application = new DerivedGenericApplication <string>();

            var extensions = RequirementDetector.GetRequiredHostExtensions(application).ToArray();

            extensions.Should().HaveCount(2);

            extensions[0].Type.Should().Be(typeof(Guid));
            extensions[1].Type.Should().Be(typeof(string));

            RequirementDetector.RequiresPort(application).Should().BeTrue();
        }
        public void Should_support_composite_applications()
        {
            var application = new MultiApplication();

            RequirementDetector.RequiresPort(application).Should().BeTrue();

            RequirementDetector.GetRequiredConfigurations(application)
            .Should()
            .ContainSingle()
            .Which.Type.Should()
            .Be(typeof(string));

            var extensions = RequirementDetector.GetRequiredHostExtensions(application).ToArray();

            extensions.Should().HaveCount(4);

            extensions[0].Type.Should().Be(typeof(IGenericInterface <string>));
            extensions[1].Type.Should().Be(typeof(IGenericInterface <string>));
            extensions[2].Type.Should().Be(typeof(Guid));
            extensions[3].Type.Should().Be(typeof(int));
        }