public void Validate_WithPath_ReturnsWithoutThrowingException() { var command = new AnnotateCommand { Path = "test.txt" }; command.Validate(); }
public void Validate_NoPath_ThrowsInvalidOperationException() { var command = new AnnotateCommand(); Assert.Throws <InvalidOperationException>(command.Validate); }
// Mercurial-FIXME: not working public override Annotation[] GetAnnotations(FilePath repositoryPath) { List<Annotation> list = new List<Annotation> (); var cmd = new AnnotateCommand ().WithPath (ToMercurialPath (repositoryPath)).WithAddUserName (true).WithAddDate (true); var anns = RootRepository.Annotate (cmd); foreach (var ann in anns.OrderBy (a => a.LineNumber)) { //var rev = repo.Log (new RevSpec (ann.RevisionNumber.ToString ())).First (); //string name = rev.AuthorName + (rev.AuthorEmailAddress != null ? " <" + rev.AuthorEmailAddress + ">" : null); list.Add (new Annotation (ann.RevisionNumber.ToString (), ann.User, ann.Date.Date)); } return list.ToArray (); }
public void Validate_NoPath_ThrowsInvalidOperationException() { var command = new AnnotateCommand(); Assert.Throws<InvalidOperationException>(command.Validate); }