Update the printing format to include the URL to reddit

This commit is contained in:
R. Tyler Ballance 2009-09-14 02:10:18 -07:00
parent e57bf929b4
commit f4ae2fdd8e
3 changed files with 12 additions and 2 deletions

View File

@ -128,6 +128,12 @@ namespace Proggitbot
#endregion
#region "Public Properties"
public string Id
{
get { return this.id; }
set { this.id = value; }
}
public string Domain
{
get { return this.domain; }

View File

@ -51,8 +51,11 @@ namespace Proggitbot
foreach (EntryData entry in entries)
{
irc.SendMessage(SendType.Action, channel,
String.Format("{0} ({1}) {2}", entry.Title, entry.Domain, entry.Url));
irc.SendMessage(SendType.Notice, channel,
String.Format("{0} ({1}) {2} {3}", entry.Title, entry.Author,
entry.Url,
String.Format("http://reddit.com/comments/{0}", entry.Id)
));
}
}

View File

@ -31,6 +31,7 @@ namespace Proggitbot.Tests
Assert.AreEqual("The science of motivation vs. problem solving", data.Title, "Title mismatch");
Assert.AreEqual("scientologist2", data.Author, "Author mismatch");
Assert.AreEqual("ted.com", data.Domain, "Domain mismatch");
Assert.AreEqual("9k30b", data.Id, "ID mismatch");
}
[Test]