User: johnsimons
Date: 2009/12/12 09:34 PM
Modified:
/MonoRail/trunk/src/
Changes.txt
/MonoRail/trunk/src/Castle.MonoRail.Framework.Tests/Services/
DefaultMonoRailContainerTestCase.cs
/MonoRail/trunk/src/Castle.MonoRail.Framework/Container/
DefaultMonoRailContainer.cs
Log:
Applied Alex's patch fixing MR-ISSUE-553 - "IRoutingEngine service when
present in parent container is not used by DefaultMonoRailContainer"
File Changes:
Directory: /MonoRail/trunk/src/Castle.MonoRail.Framework/Container/
===================================================================
File [modified]: DefaultMonoRailContainer.cs
Delta lines: +16 -2
===================================================================
---
MonoRail/trunk/src/Castle.MonoRail.Framework.Tests/Services/DefaultMonoRailContainerTestCase.cs
2009-12-13 03:29:10 UTC (rev 6408)
+++
MonoRail/trunk/src/Castle.MonoRail.Framework.Tests/Services/DefaultMonoRailContainerTestCase.cs
2009-12-13 04:34:05 UTC (rev 6409)
@@ -51,7 +51,7 @@
_defaultMonoRailContainer.AddService<IDynamicActionProviderFactory>(new
DefaultDynamicActionProviderFactory());
_defaultMonoRailContainer.AddService<IAjaxProxyGenerator>(new
PrototypeAjaxProxyGenerator());
_defaultMonoRailContainer.AddService<IDictionaryAdapterFactory>(new
DictionaryAdapterFactory());
-
+
_serviceTypes.Add(typeof(IUrlTokenizer));
_serviceTypes.Add(typeof(IUrlBuilder));
_serviceTypes.Add(typeof(ICacheProvider));
@@ -84,7 +84,7 @@
{
Type containerType =
_defaultMonoRailContainer.GetType();
- foreach(Type serviceType in _serviceTypes)
+ foreach (Type serviceType in _serviceTypes)
{
// check if it was registered
Assert.IsTrue(_defaultMonoRailContainer.HasService(serviceType),
string.Format("expected registered service of type {0}", serviceType));
@@ -113,5 +113,19 @@
Assert.AreSame(serviceInstance,
_defaultMonoRailContainer.GetService(serviceType), string.Format("Cache bug
found for service {0}", serviceType));
}
}
+
+ [Test]
+ public void
UseServicesFromParent_WhenParentContainsRoutingEngineService_ServiceAddedToMonoRailContainer()
+ {
+ IRoutingEngine engine =
MockRepository.GenerateStub<IRoutingEngine>();
+ IServiceProvider parent =
MockRepository.GenerateStub<IServiceProvider>();
+
+ parent.Stub(stub =>
stub.GetService(typeof(IRoutingEngine))).Return(engine);
+
+ DefaultMonoRailContainer container = new
DefaultMonoRailContainer(parent);
+ container.UseServicesFromParent();
+
+ Assert.True(container.HasService<IRoutingEngine>());
+ }
}
}
Directory: /MonoRail/trunk/src/Castle.MonoRail.Framework.Tests/Services/
========================================================================
File [modified]: DefaultMonoRailContainerTestCase.cs
Delta lines: +3 -0
===================================================================
--- MonoRail/trunk/src/Changes.txt 2009-12-13 03:29:10 UTC (rev 6408)
+++ MonoRail/trunk/src/Changes.txt 2009-12-13 04:34:05 UTC (rev 6409)
@@ -1,5 +1,8 @@
Unreleased
==========
+- Applied Alex's patch fixing MR-ISSUE-553
+ "IRoutingEngine service when present in parent container is not used by
DefaultMonoRailContainer"
+
- Applied Rich Prior's patch fixing MR-ISSUE-550
"AspView can't find view when accessing paths with a capital 'I' when set to
Turkish locale"
Directory: /MonoRail/trunk/src/
===============================
File [modified]: Changes.txt
Delta lines: +0 -0
===================================================================
--
You received this message because you are subscribed to the Google Groups
"Castle Project Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-commits?hl=en.