public void GetCode_EndLineIsOneAndTwoLinesOfCode_ReturnsFirstLineOfCode() { string fullCode = "first\r\n" + "second"; CreateLocalMethod(fullCode); int endLine = 1; string code = method.GetCode(endLine); string expectedCode = "first\r\n"; Assert.AreEqual(expectedCode, code); }
string GetLocalMethodCode(PythonResolverContext resolverContext) { ScriptingLocalMethod localMethod = new ScriptingLocalMethod(resolverContext.FileContent); int beginLine = resolverContext.ExpressionRegion.BeginLine; return(localMethod.GetCode(beginLine)); }