Update the printing format based on ##Proggit feedback, now printing ups and the direct reddit link
This commit is contained in:
parent
cca0889d18
commit
9fd938917c
|
@ -134,6 +134,18 @@ namespace Proggitbot
|
|||
set { this.id = value; }
|
||||
}
|
||||
|
||||
public Int64 Ups
|
||||
{
|
||||
get { return this.ups; }
|
||||
set { this.ups = value; }
|
||||
}
|
||||
|
||||
public Int64 Downs
|
||||
{
|
||||
get { return this.downs; }
|
||||
set { this.downs = value; }
|
||||
}
|
||||
|
||||
public string Domain
|
||||
{
|
||||
get { return this.domain; }
|
||||
|
|
|
@ -51,9 +51,8 @@ namespace Proggitbot
|
|||
|
||||
foreach (EntryData entry in entries)
|
||||
{
|
||||
irc.SendMessage(SendType.Notice, channel,
|
||||
String.Format("{0} ({1}) {2} {3}", entry.Title, entry.Author,
|
||||
entry.Url,
|
||||
irc.SendMessage(SendType.Message, channel,
|
||||
String.Format("[+{0}/-{1}] {2} {3}", entry.Ups, entry.Downs, entry.Title,
|
||||
String.Format("http://reddit.com/comments/{0}", entry.Id)
|
||||
));
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ namespace Proggitbot.Tests
|
|||
Assert.AreEqual("scientologist2", data.Author, "Author mismatch");
|
||||
Assert.AreEqual("ted.com", data.Domain, "Domain mismatch");
|
||||
Assert.AreEqual("9k30b", data.Id, "ID mismatch");
|
||||
Assert.AreEqual(450, data.Ups, "Ups mismatch");
|
||||
Assert.AreEqual(97, data.Downs, "Downs mismatch");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Reference in New Issue