public void LoadXmlWithAutoRegistration() { // Arrange var context = new XmlApplicationContext("assembly://Spring.AutoRegistration.Test/Spring.AutoRegistration.Test/SpringObjectsSimple.xml"); context.Configure() .IncludeAssembly(x => x.FullName.StartsWith("Spring.AutoRegistration.Test")) .Include(x => x.ImplementsITypeName(), Then.Register().UsingSingleton()) .ApplyAutoRegistration(); // Act var repository = context.GetObject("Repository") as IRepository; var foo = context.GetObject("Foo") as IFoo; // Assert repository.Should().NotBeNull(); foo.Should().NotBeNull(); }