public void Setup() { _cache = new OutputWriter(new NullResponseWriter()); _parser = new NRefactoryParser() //_parser = new CSharpFileParser() .SetOutputWriter(_cache); _parser.ParseFile(new FileRef("file1", null), () => { return(getContent()); }); }
public void Setup() { _cache = new OutputWriter(new NullResponseWriter()); _parser = new NRefactoryParser() //_parser = new CSharpFileParser() .SetOutputWriter(_cache); _parser.ParseFile(new FileRef("file1", null), () => { return getContent(); }); }
public void Should_find_basic_namespace() { var cache = new OutputWriter(new NullResponseWriter()); _parser = new NRefactoryParser() .SetOutputWriter(cache); _parser.ParseFile(new FileRef("TestFile", null), () => { return "namespace MyFirstNS {}"; }); var ns = cache.Namespaces.ElementAt(0); Assert.That(ns.File.File, Is.EqualTo("TestFile")); Assert.That(ns.Signature, Is.EqualTo("MyFirstNS")); Assert.That(ns.Name, Is.EqualTo("MyFirstNS")); Assert.That(ns.Line, Is.EqualTo(1)); Assert.That(ns.Column, Is.EqualTo(11)); Assert.That(ns.EndLine, Is.EqualTo(1)); Assert.That(ns.EndColumn, Is.EqualTo(23)); }
public void Should_find_basic_namespace() { var cache = new OutputWriter(new NullResponseWriter()); _parser = new NRefactoryParser() .SetOutputWriter(cache); _parser.ParseFile(new FileRef("TestFile", null), () => { return("namespace MyFirstNS {}"); }); var ns = cache.Namespaces.ElementAt(0); Assert.That(ns.File.File, Is.EqualTo("TestFile")); Assert.That(ns.Signature, Is.EqualTo("MyFirstNS")); Assert.That(ns.Name, Is.EqualTo("MyFirstNS")); Assert.That(ns.Line, Is.EqualTo(1)); Assert.That(ns.Column, Is.EqualTo(11)); Assert.That(ns.EndLine, Is.EqualTo(1)); Assert.That(ns.EndColumn, Is.EqualTo(23)); }