Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Context/Support
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9189/Context/Support
Modified Files:
ContextLocatorHandlerTests.cs
Log Message:
Fixed Hierarchical context loading. SPRNET-891
Index: ContextLocatorHandlerTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Context/Support/ContextLocatorHandlerTests.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ContextLocatorHandlerTests.cs 9 Apr 2006 07:19:07 -0000 1.11
--- ContextLocatorHandlerTests.cs 13 Mar 2008 20:07:54 -0000 1.12
***************
*** 151,162 ****
IApplicationContext childCtx = ContextRegistry.GetContext("Child");
Assert.IsNotNull(childCtx, "Child context not registered.");
! Assert.AreEqual("Parent", parentCtx.Name, "Child's DisplayName property not picked up from config file.");
// ensure proper objects have been loaded into the correct context...
! Assert.IsTrue(parentCtx.ContainsObjectDefinition("Parent"), "Parent contexct object not present (must be).");
Assert.IsFalse(parentCtx.ContainsObjectDefinition("Child"), "Wrong (child context) object present in Parent context.");
! Assert.IsTrue(childCtx.ContainsObjectDefinition("Child"), "Child contexct object not present (must be).");
Assert.IsFalse(childCtx.ContainsObjectDefinition("Parent"), "Wrong (parent context) object present in Child context.");
}
}
--- 151,171 ----
IApplicationContext childCtx = ContextRegistry.GetContext("Child");
Assert.IsNotNull(childCtx, "Child context not registered.");
! Assert.AreEqual("Child", childCtx.Name, "Child's DisplayName property not picked up from config file.");
! Assert.AreEqual("Parent", childCtx.ParentContext.Name);
! IApplicationContext grandchildCtx = ContextRegistry.GetContext("Grandchild");
! Assert.IsNotNull(grandchildCtx, "Grandchild context not registered.");
! Assert.AreEqual("Grandchild", grandchildCtx.Name, "Grandchild's DisplayName property not picked up from config file.");
! Assert.AreEqual("Child", grandchildCtx.ParentContext.Name);
// ensure proper objects have been loaded into the correct context...
! Assert.IsTrue(parentCtx.ContainsObjectDefinition("Parent"), "Parent context object not present (must be).");
Assert.IsFalse(parentCtx.ContainsObjectDefinition("Child"), "Wrong (child context) object present in Parent context.");
! Assert.IsTrue(childCtx.ContainsObjectDefinition("Child"), "Child context object not present (must be).");
Assert.IsFalse(childCtx.ContainsObjectDefinition("Parent"), "Wrong (parent context) object present in Child context.");
+
+ Assert.IsTrue(grandchildCtx.ContainsObjectDefinition("Grandchild"), "Grandchild context object not present (must be).");
+ Assert.IsFalse(grandchildCtx.ContainsObjectDefinition("Child"), "Wrong (parent context) object present in Grandchild context.");
+ Assert.IsFalse(grandchildCtx.ContainsObjectDefinition("Parent"), "Wrong (parent context) object present in Grandchild context.");
}
}
|