Update the printing format to include the URL to reddit
This commit is contained in:
parent
e57bf929b4
commit
f4ae2fdd8e
|
@ -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; }
|
||||
|
|
|
@ -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)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue