Inheritance: StructureMap.Pipeline.Instance
        public void has_family_but_family_does_not_have_owner()
        {
            var family = new PluginFamily(GetType());
            var instance = new SimpleInstance();
            family.AddInstance(instance);

            instance.Owner().ShouldBeNull();
        }
Beispiel #2
0
        public void has_family_but_family_does_not_have_owner()
        {
            var family   = new PluginFamily(GetType());
            var instance = new SimpleInstance();

            family.AddInstance(instance);

            instance.Owner().ShouldBeNull();
        }
        public void has_family_and_family_has_parent()
        {
            var graph = new PluginGraph();

            var family = graph.Families[GetType()];
            var instance = new SimpleInstance();
            family.AddInstance(instance);

            instance.Owner().ShouldBeTheSameAs(graph);
        }
        public void get_the_owner_when_part_of_a_profile()
        {
            var graph = new PluginGraph();
            var profile = graph.Profile("something");

            var family = profile.Families[GetType()];
            var instance = new SimpleInstance();
            family.AddInstance(instance);

            instance.Owner().ShouldBeTheSameAs(graph);
        }
Beispiel #5
0
        public void has_family_and_family_has_parent()
        {
            var graph = new PluginGraph();

            var family   = graph.Families[GetType()];
            var instance = new SimpleInstance();

            family.AddInstance(instance);

            instance.Owner().ShouldBeTheSameAs(graph);
        }
Beispiel #6
0
        public void get_the_owner_when_part_of_a_deep_profile()
        {
            var graph   = new PluginGraph();
            var profile = graph.Profile("something").Profile("else").Profile("again");

            var family   = profile.Families[GetType()];
            var instance = new SimpleInstance();

            family.AddInstance(instance);

            instance.Owner().ShouldBeTheSameAs(graph);
        }