protected abstract void BlameExtraInternals(Annotation [] annotations);
protected override void BlameExtraInternals (Annotation [] annotations) { for (int i = 0; i < 2; i++) { Assert.IsTrue (annotations [i].HasEmail); Assert.IsNotNull (annotations [i].Author); Assert.IsNotNull (annotations [i].Email); } Assert.IsTrue (annotations [2].HasDate); }
public override Annotation[] GetAnnotations (Repository repo, FilePath file, SvnRevision revStart, SvnRevision revEnd) { if (file == FilePath.Null) throw new ArgumentNullException (); SvnPathTarget target = new SvnPathTarget (file, SharpSvn.SvnRevision.Base); MemoryStream data = new MemoryStream (); int numAnnotations = 0; client.Write (target, data); using (StreamReader reader = new StreamReader (data)) { reader.BaseStream.Seek (0, SeekOrigin.Begin); while (reader.ReadLine () != null) numAnnotations++; } System.Collections.ObjectModel.Collection<SvnBlameEventArgs> list; SvnBlameArgs args = new SvnBlameArgs (); args.Start = GetRevision (revStart); args.End = GetRevision (revEnd); if (client.GetBlame (target, args, out list)) { Annotation[] annotations = new Annotation [numAnnotations]; foreach (var annotation in list) { if (annotation.LineNumber < annotations.Length) annotations [(int)annotation.LineNumber] = new Annotation (annotation.Revision.ToString (), annotation.Author, annotation.Time); } return annotations; } return new Annotation[0]; }
protected override void BlameExtraInternals (Annotation [] annotations) { for (int i = 0; i < 2; i++) { Assert.IsTrue (annotations [i].HasEmail); Assert.AreEqual (Author, annotations [i].Author); Assert.AreEqual (String.Format ("<{0}>", Email), annotations [i].Email); } Assert.IsFalse (annotations [2].HasDate); }
protected override void BlameExtraInternals (Annotation [] annotations) { // TODO: Fix this for bots. // for (int i = 0; i < 2; i++) { // Assert.IsTrue (annotations [i].HasEmail); // Assert.AreEqual (Author, annotations [i].Author); // Assert.AreEqual (String.Format ("<{0}>", Email), annotations [i].Email); // } Assert.IsTrue (annotations [2].HasDate); }