public void InstancesWithNoNameWillBeAttachedToTheirInstrumentationListeners() { DictionaryConfigurationSource configSource = new DictionaryConfigurationSource(); configSource.Add(InstrumentationConfigurationSection.SectionName, new InstrumentationConfigurationSection(true, true, true)); MockBuilderContext context = new MockBuilderContext(); context.Policies.AddPolicies(GetPolicies(configSource)); InstrumentationStrategy strategy = new InstrumentationStrategy(); UnnamedSource source = new UnnamedSource(); UnnamedSource createdObject = strategy.BuildUp <UnnamedSource>(context, source, null); Assert.IsTrue(createdObject.IsWired); }
public void InstancesWithNoNameWillBeAttachedToTheirInstrumentationListeners() { DictionaryConfigurationSource configSource = new DictionaryConfigurationSource(); configSource.Add(InstrumentationConfigurationSection.SectionName, new InstrumentationConfigurationSection(true, true, true, "fooApplicationInstanceName")); UnnamedSource source = new UnnamedSource(); BuilderContext context = new BuilderContext( new StrategyChain(), null, null, new PolicyList(GetPolicies(configSource)), NamedTypeBuildKey.Make <UnnamedSource>(), source); InstrumentationStrategy strategy = new InstrumentationStrategy(); strategy.PreBuildUp(context); Assert.IsTrue(((UnnamedSource)context.Existing).IsWired); }
public void InstancesWithNoNameWillBeAttachedToTheirInstrumentationListeners() { DictionaryConfigurationSource configSource = new DictionaryConfigurationSource(); configSource.Add(InstrumentationConfigurationSection.SectionName, new InstrumentationConfigurationSection(true, true, true)); MockBuilderContext context = new MockBuilderContext(); context.Policies.AddPolicies(GetPolicies(configSource)); InstrumentationStrategy strategy = new InstrumentationStrategy(); UnnamedSource source = new UnnamedSource(); UnnamedSource createdObject = strategy.BuildUp<UnnamedSource>(context, source, null); Assert.IsTrue(createdObject.IsWired); }