GetChangesetUrl() public method

public GetChangesetUrl ( ) : string
return string
 public void SendCheckinNotification(CheckinEvent checkinEvent, int roomId)
 {
     var message = string.Format("{0} checked in changeset <a href=\"{1}\">{2}</a> ({4})<br>{3}",
         checkinEvent.GetCommitterName(), checkinEvent.GetChangesetUrl(), checkinEvent.Number,
         checkinEvent.Comment.Replace("\n", "<br>"), checkinEvent.TeamProject);
     _hipChatClient.RoomId = roomId;
     _hipChatClient.SendMessage(message, HipChatClient.BackgroundColor.yellow);
 }
        public void GetChangesetUrl_ShouldReturnNull_WhenUrlDoesNotExist()
        {
            var checkinEvent = new CheckinEvent { Artifacts = new List<ClientArtifact>() };

            var url = checkinEvent.GetChangesetUrl();

            Assert.Equal(null, url);
        }
        public void GetChangesetUrl_ShouldReturnChangesetUrl_WhenUrlExists()
        {
            const string checkinUrl = "http://some-tfs-server.com/path?query=0";
            var checkinEvent = new CheckinEvent { Artifacts = new List<ClientArtifact>() };
            checkinEvent.Artifacts.Add(new ClientArtifact { ArtifactType = "Changeset", Url = checkinUrl });

            var url = checkinEvent.GetChangesetUrl();

            Assert.Equal(checkinUrl, url);
        }
Beispiel #4
0
 public void SendCheckinNotification(CheckinEvent checkinEvent, int roomId)
 {
     var message = string.Format("{0} - <a href=\"{1}\">{2}</a>",
                                 checkinEvent.GetCommitterName(),
                                 checkinEvent.GetChangesetUrl(),
                                 checkinEvent.Comment.Replace("\n", "<br>"));
     _hipChatClient.From = GetFromValue("Source");
     _hipChatClient.RoomId = roomId;
     _hipChatClient.SendMessage(message, HipChatClient.BackgroundColor.yellow);
 }