private static void AssertEqualFiles(string inFilePath, string outDirPath, string inDirPath) { var relative = ParaibaPath.GetRelativePath(inFilePath, inDirPath); var actualJava = ParaibaPath.GetFullPath(relative, outDirPath); Assert.That(File.ReadAllBytes(actualJava), Is.EqualTo(File.ReadAllBytes(inFilePath))); }
private static string WriteCode(string relativePath, DirectoryInfo outDir, string code) { var outPath = ParaibaPath.GetFullPath(relativePath, outDir.FullName); Directory.CreateDirectory(Path.GetDirectoryName(outPath)); using (var writer = new StreamWriter(outPath, false, XEncoding.SJIS)) { writer.Write(code); } return(outPath); }
private void LvStatementDoubleClick(object sender, EventArgs e) { var item = (CoverageListViewItem) _lvStatement.GetItemAt(_lastMouseLocation.X, _lastMouseLocation.Y); var element = item.Element; var path = ParaibaPath.GetFullPath(element.RelativePath, _info.BasePath); new Editor( path, _info.StatementTargets .Where( elm => elm.RelativePath == element.RelativePath && elm.State != CoverageState.Done)).Show(); }