public void RegisterAssemblies() { MockXMLContainerBuilder containerBuilder = new MockXMLContainerBuilder(null); FileInfo testCompDll = new FileInfo(@"../../../TestComp/bin/Debug/TestComp.dll"); FileInfo testComp2Dll = new FileInfo(@"../../../TestComp2/bin/Debug/TestComp2.dll"); string xml = @"<assemblies> <element file='" + testCompDll.FullName + @"'/> <element url='" + new Uri("file://" + testComp2Dll) + @"'/> </assemblies>"; XmlElement classpathElement = ConvertToXml(xml); IList assemblies = new ArrayList(); containerBuilder.CallRegisterAssemblies(classpathElement, assemblies); Assert.AreEqual(2, assemblies.Count); }
public void RegisterAssembliesUnknownFileFails() { MockXMLContainerBuilder containerBuilder = new MockXMLContainerBuilder(null); string xml = @"<assemblies> <element file='this.should.fail'/> </assemblies>"; containerBuilder.CallRegisterAssemblies(ConvertToXml(xml), new ArrayList()); }