예제 #1
0
        public void HasProperty_for_child_array()
        {
            var instance = new ConfiguredInstance(GetType());

            IConfiguredInstance configuredInstance = instance;

            configuredInstance.Dependencies.Has("prop1").ShouldBeFalse();

            instance.EnumerableOf <IGateway>("prop1").Contains(new DefaultInstance());
            configuredInstance.Dependencies.Has("prop1").ShouldBeTrue();
        }
        public void HasProperty_for_generic_child_array_when_property_name_is_inferred()
        {
            var instance = new ConfiguredInstance(typeof(UsesGateways));

            IConfiguredInstance configuredInstance = instance;

            configuredInstance.HasProperty("gateways", null).ShouldBeFalse();

            instance.EnumerableOf <IGateway>().Contains(new DefaultInstance());
            configuredInstance.HasProperty("gateways", null).ShouldBeTrue();
        }