public static void Main(string[] args) { if (args[0].Equals("annotate")) { // get cached change sets var changeSets = new ChangeSets(); // get annotated original var annotateOutput = ExecTfpt(args); TransformAnnotation transform = null; try { transform = new TransformAnnotation(changeSets, annotateOutput); } catch (KeyNotFoundException) { var newArgs = (string[])args.Clone(); newArgs[0] = "history"; var list = new List<string>(newArgs) { "/itemmode" }; var historyOutput = ExecTf(list.ToArray()); changeSets.AddHistory(historyOutput); transform = new TransformAnnotation(changeSets, annotateOutput); } Console.Out.Write(transform.GetTransformedAnnotation()); } else { var output = ExecTfpt(args); Console.Out.Write(output); } Console.Out.Flush(); }
public void ParseHistory() { var changeSets = new ChangeSets(); changeSets.AddHistory(History); Assert.AreEqual(@"28, XXXXXXX\mica1, 10/11/2013", changeSets.Get("28")); var transform = new TransformAnnotation(changeSets, AnnotatedLine); var transformed = transform.GetTransformedAnnotation(); Assert.AreEqual(@"28, XXXXXXX\mica1, 10/11/2013 public class BasketballGameActionHandler : IGameActionHandler", transformed); }