private CompiledModel ComileAssembly(LoadedClasses classes)
        {
            TypeCompiler compiler = new TypeCompiler();

            compiler.AddGivenTypes(GetGivenTypesContents());
            return(compiler.Compile(
                       classes.Files.Values
                       .Select(file => file.Contents)));
        }
        public void TestCompileOneType()
        {
            TypeCompiler compiler = new TypeCompiler();

            CompiledModel oneType = compiler.Compile(new [] { testClassContent });
            Type          type    = oneType.GetType(TestClass);

            Assert.AreEqual(type.Name, TestClass);
        }
        public void TestCompileWithGivenTypes()
        {
            TypeCompiler compiler = new TypeCompiler();

            compiler.AddGivenTypes(
                new [] { testClassContent });

            CompiledModel oneType = compiler.Compile(
                new[] { usingTestClassContent });

            Type type = oneType.GetType(UsingTestClass);

            Assert.AreEqual(type.Name, UsingTestClass);
        }
        public void TestCompileTwoTypes()
        {
            TypeCompiler compiler = new TypeCompiler();

            CompiledModel twoTypes = compiler.Compile(
                new []
            {
                testClassContent,
                usingTestClassContent
            });
            Type type = twoTypes.GetType(UsingTestClass);

            Assert.AreEqual(type.Name, UsingTestClass);
        }
        public void TestCompileNull()
        {
            TypeCompiler compiler = new TypeCompiler();

            compiler.Compile(null);
        }
        public void TestCompileNothing()
        {
            TypeCompiler compiler = new TypeCompiler();

            compiler.Compile(new string[0]);
        }