public void CanAddContainerExtensionViaConfig() { TestForExpectedActions("ContainerExtensions", Sequence.Collect( ConfigurationActionRecord.AddExtensionAction(typeof(MockContainerExtension)), ConfigurationActionRecord.RegisterAction(typeof(ILogger), typeof(SpecialLogger), null, new ContainerControlledLifetimeManager()) )); }
public void CanSpecifyLifetimeForType() { TestForExpectedActions("Lifetimes", Sequence.Collect( ConfigurationActionRecord.RegisterAction( typeof(ILogger), typeof(SpecialLogger), null, new ContainerControlledLifetimeManager()), ConfigurationActionRecord.RegisterAction( typeof(ILogger), typeof(MockLogger), "mock", new ExternallyControlledLifetimeManager()), ConfigurationActionRecord.RegisterAction( typeof(ILogger), typeof(MockLogger), "session", new SessionLifetimeManager("sessionKey")), ConfigurationActionRecord.RegisterAction( typeof(ILogger), typeof(MockLogger), "reverseSession", new SessionLifetimeManager("sdrawkcab")), ConfigurationActionRecord.RegisterAction( typeof(ILogger), typeof(MockLogger), "transient", null), ConfigurationActionRecord.RegisterAction( typeof(ILogger), typeof(MockLogger), "explicitTransient", null) ) ); }
public void ContainerGeneratesExpectedConfiguration() { TestForExpectedActions("UnnamedContainers", Sequence.Collect( ConfigurationActionRecord.RegisterAction(typeof(ILogger), typeof(SpecialLogger), null, new ContainerControlledLifetimeManager()) )); }