public void NanoContainerCanBeBuiltFromCodeOnTheFly()
		{
			// Boo relies on indentation so start at column 1. MUST NOT BE REFORMATTED
			string code = @"
import PicoContainer from PicoContainer
import PicoContainer.Defaults from PicoContainer

class BooInjector:
	
	[Property(Parent)]
	_parent as IPicoContainer
	
	def Compose() as IMutablePicoContainer:
		p = DefaultPicoContainer(_parent)
		p.RegisterComponentInstance(10, 1000)
		return p

			";

			IMutablePicoContainer parent = new DefaultPicoContainer();
			ContainerBuilderFacade cbf = new BooContainerBuilderFacade(ScriptFixture.BuildStreamReader(code));
			IPicoContainer pico = cbf.Build(parent, new ArrayList());

			Assert.IsNotNull(pico);
			Assert.AreSame(parent, pico.Parent);
			Assert.AreEqual(1000, pico.GetComponentInstance(10));
		}
		public void ContainerCanBeBuiltWithParent()
		{
			IMutablePicoContainer parent = new DefaultPicoContainer();
			ContainerBuilderFacade cbf = new BooContainerBuilderFacade(GetStreamReader(@"NanoContainer.Tests.TestScripts.test.boo"));
			IPicoContainer pico = cbf.Build(parent, new ArrayList());
			Assert.IsNotNull(pico);
			Assert.AreSame(parent, pico.Parent);
			Assert.AreEqual("Boo", pico.GetComponentInstance("foo"));
		}
		private IPicoContainer BuildContainer(string script)
		{
			IMutablePicoContainer parent = new DefaultPicoContainer();
			ContainerBuilderFacade containerBuilderFacade = new BooContainerBuilderFacade(ScriptFixture.BuildStreamReader(script));
			
			// register "this" test dll as an assembly to use
			StringCollection assemblies = new StringCollection();
			assemblies.Add("NanoContainer.Tests.dll");

			return containerBuilderFacade.Build(parent, assemblies);
		}
		public void CreateContainerFromNullScriptThrowsArgumentNullException()
		{
			string script = null;
			StreamReader scriptStream = new StreamReader(new MemoryStream(new ASCIIEncoding().GetBytes(script)));
			ContainerBuilderFacade cbf = new BooContainerBuilderFacade(scriptStream);
			cbf.Build(new ArrayList());
		}
		/// <summary>
		/// not sure if this is a good idea, .NET has a predefined way of finding assemblies
		///
		/// Boo doesn't allow you reference an external assembly not found in the normal ways.
		/// The workaround is to pass an array of assemblies to ContainerBuilder.BuildContainer() in code
		/// defeating the purpose using a Boo script an an injector. 
		///
		/// intentionally not marked as Test
		/// </summary>
		public void LoadFromAnExternalAssembly()
		{
			// not implemented
			FileInfo testCompDll = new FileInfo("../../../TestComp/bin/Debug/TestComp.dll");
			Assert.IsTrue(testCompDll.Exists);

			string script = @"
import PicoContainer from PicoContainer
import PicoContainer.Defaults from PicoContainer
import TestComp from TestComp

class BooInjector:
	
	[Property(Parent)]
	_parent as IPicoContainer
	
	def Compose() as IMutablePicoContainer:
		p = DefaultPicoContainer(_parent)
		p.RegisterComponentImplementation(""foo"", typeof(TestComp))
		return p
			";

			// collect the external assemblies to pass into BuildContainer
			IList assemblies = new ArrayList();
			assemblies.Add(testCompDll.FullName);

			StreamReader scriptStream = new StreamReader(new MemoryStream(Encoding.UTF8.GetBytes(script)));
			IMutablePicoContainer parent = new DefaultPicoContainer();
			ContainerBuilderFacade cbf = new BooContainerBuilderFacade(scriptStream);
			IPicoContainer pico = cbf.Build(parent, assemblies);

			object fooTestComp = pico.GetComponentInstance("foo");
			Assert.IsNotNull(fooTestComp, "Container should have a 'foo' component");
		}