public void Test() { var ex = Assert.Throws <ApplicationException>(() => { var code = @"//css_inc test (script, which has ';' chars).cs; using System; static void SayHello(string greeting) { Console.WriteLine(greeting); }"; var parser = new CSharpParser(code, false, null, null); }); //parser.GetRawStatements("//css_inc", code.Length-1); //Assert.True(1 == 1); }
public void Test() { var ex = Assert.Throws<ApplicationException>(() => { var code = @"//css_inc test (script, which has ';' chars).cs; using System; static void SayHello(string greeting) { Console.WriteLine(greeting); }"; var parser = new CSharpParser(code, false, null, null); }); //parser.GetRawStatements("//css_inc", code.Length-1); //Assert.True(1 == 1); }
public void Test() { try { var code = @"//css_inc test (script, which has ';' chars).cs; using System; static void SayHello(string greeting) { Console.WriteLine(greeting); }"; var parser = new CSharpParser(code, false, null, null); } catch (Exception ex) { // because of te multiple assemblies with the same type loaded // it's impossible to use Assert.Throw<SpecificAssemblyType> reliably } }