Load assemblies and build a reflection graph of the contained types.
Beispiel #1
0
        public void ConstructWithParametersAssemblyNameInputAssembliesTest()
        {
            this.testObject = new AssemblyFetcher(this.methodVisibility, "Some other root", this.inputAssemblies);

            Assert.Throws<ArgumentNullException>(() => new AssemblyFetcher(this.methodVisibility, null, this.inputAssemblies));
            Assert.Throws<ArgumentException>(() => new AssemblyFetcher(this.methodVisibility, string.Empty, this.inputAssemblies));
            Assert.Throws<ArgumentNullException>(() => new AssemblyFetcher(this.methodVisibility, this.assemblyName, null));
        }
Beispiel #2
0
 public void LoadAssemblyWithDifferentDescription()
 {
     var expectedRootName = "Different Name";
     this.testObject = new AssemblyFetcher(this.methodVisibility, expectedRootName, this.inputAssemblies);
     var result = testObject.LoadAssembly();
     Assert.IsNotNull(result);
     Assert.IsNotEmpty(result.Nodes);
     Assert.AreEqual(expectedRootName, result.Text);
 }
Beispiel #3
0
        public void SetUp()
        {
            var assemblies = new[]
            {
                typeof(AssemblyFetcher).Assembly,
                typeof(AssemblyFetcherTest).Assembly,
                typeof(Rhino.Mocks.MockRepository).Assembly,
            }.ToList();

            this.methodVisibility = MemberVisibility.Public;
            this.assemblyName = typeof(AssemblyFetcherTest).Assembly.Location;
            this.inputAssemblies = assemblies.Select(e => e.Location).ToList();
            this.testObject = new AssemblyFetcher(this.methodVisibility, this.assemblyName, this.inputAssemblies);
        }
Beispiel #4
0
 public void LoadAssemblyWithNullInInputAssembliesThrows()
 {
     this.inputAssemblies[1] = null;
     this.testObject = new AssemblyFetcher(this.methodVisibility, "HelloTest", this.inputAssemblies);
     Assert.Throws<ArgumentNullException>(() => testObject.LoadAssembly());
 }
Beispiel #5
0
 public void LoadAssemblyWithNonValidFilenameInInputAssembliesThrows()
 {
     this.inputAssemblies[1] = "A assembly that can't be a valid one.dll";
     this.testObject = new AssemblyFetcher(this.methodVisibility, "HelloTest", this.inputAssemblies);
     Assert.Throws<ArgumentException>(() => testObject.LoadAssembly());
 }
Beispiel #6
0
 public void TearDown()
 {
     this.testObject = null;
 }