Beispiel #1
0
        public void ThrowsExceptionOnAddingBadReference()
        {
            ICompiler c = Compiler.Create();

            c.AssemblyName = "Assem5";
            Assert.Throws <TypeLoadException>(() => c.AddReference("xyzzy"));
        }
Beispiel #2
0
        public void AddsAReferenceToAType()
        {
            ICompiler c = Compiler.Create();

            c.AssemblyName = "Assem2";
            c.AddReference(typeof(object));
            Assert.IsType <Compiler>(c);
        }
Beispiel #3
0
        public void AddsAReferenceByTypeName()
        {
            ICompiler c = Compiler.Create();

            c.AssemblyName = "Assem3";
            c.AddReference("System.IO.Path");
            Assert.IsType <Compiler>(c);
        }