public void CompilerNull() { throw new AssertionException("Should Ignore"); Stream stream = GetCSharpSample(); CompilerAssert.Compiles(null, stream); }
public void CSharpStringCompiles() { Stream stream = GetCSharpSample(); using (StreamReader sr = new StreamReader(stream)) { CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, sr.ReadToEnd()); } }
public void CSharpStringReferenceCollectionCompiles() { Stream stream = GetCSharpSample(); using (StreamReader sr = new StreamReader(stream)) { System.Collections.Specialized.StringCollection references = new System.Collections.Specialized.StringCollection(); references.Add("System.dll"); CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, references, sr.ReadToEnd()); } }
public void CSharpStringCompilerParametersCompiles() { Stream stream = GetCSharpSample(); using (StreamReader sr = new StreamReader(stream)) { CompilerParameters options; string[] assemblyNames = new string[] { "System.dll" }; options = new CompilerParameters(assemblyNames, "CSharpStringCompilerParametersCompiles"); CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, options, sr.ReadToEnd()); options = new CompilerParameters(assemblyNames, "CSharpStringCompilerParametersCompiles", true); CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, options, sr.ReadToEnd()); options = new CompilerParameters(assemblyNames, "CSharpStringCompilerParametersCompiles", false); CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, options, sr.ReadToEnd()); } }
public void CSharpStreamCompilerParametersCompiles() { Stream stream; CompilerParameters options; string[] assemblyNames = new string[] { "System.dll" }; stream = GetCSharpSample(); options = new CompilerParameters(assemblyNames, "CSharpStreamCompilerParametersCompiles"); CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, options, stream); stream = GetCSharpSample(); options = new CompilerParameters(assemblyNames, "CSharpStreamCompilerParametersCompiles", true); CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, options, stream); stream = GetCSharpSample(); options = new CompilerParameters(assemblyNames, "CSharpStreamCompilerParametersCompiles", false); CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, options, stream); }
public void StreamNull() { Stream stream = null; CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, stream); }
public void CSharpStreamCompiles() { Stream stream = GetCSharpSample(); CompilerAssert.Compiles(CompilerAssert.CSharpCompiler, stream); }
public void CompilerNull() { Stream stream = GetCSharpSample(); CompilerAssert.Compiles(null, stream); }