Exemple #1
0
        public void Render_with_spaces_with_links()
        {
            var expectedHeader = "Author:      <a href='mailto:[email protected]'>John Doe (Acme Inc) &lt;[email protected]&gt;</a>" + Environment.NewLine +
                                 "Author date: 3 days ago (" + LocalizationHelpers.GetFullDateString(_data.AuthorDate) + ")" + Environment.NewLine +
                                 "Committer:   <a href='mailto:[email protected]'>Jane Doe &lt;[email protected]&gt;</a>" + Environment.NewLine +
                                 "Commit date: 2 days ago (" + LocalizationHelpers.GetFullDateString(_data.CommitDate) + ")" + Environment.NewLine +
                                 "Commit hash: " + _data.Guid + Environment.NewLine +
                                 "Children:    <a href='gitext://gotocommit/" + _data.ChildrenGuids[0] + "'>" + _data.ChildrenGuids[0].Substring(0, 10) + "</a> <a href='gitext://gotocommit/" + _data.ChildrenGuids[1] + "'>" + _data.ChildrenGuids[1].Substring(0, 10) + "</a> <a href='gitext://gotocommit/" + _data.ChildrenGuids[2] + "'>" + _data.ChildrenGuids[2].Substring(0, 10) + "</a>" + Environment.NewLine +
                                 "Parent(s):   <a href='gitext://gotocommit/" + _data.ParentGuids[0] + "'>" + _data.ParentGuids[0].Substring(0, 10) + "</a> <a href='gitext://gotocommit/" + _data.ParentGuids[1] + "'>" + _data.ParentGuids[1].Substring(0, 10) + "</a>";

            var result = _rendererSpaces.Render(_data, true);

            result.Should().Be(expectedHeader);
        }
Exemple #2
0
 public void Render_should_throw_if_data_null()
 {
     ((Action)(() => _renderer.Render(null, true))).ShouldThrow <ArgumentNullException>();
 }