vgquotes/Tests/VideoGameQuotes.Api.Tests/QuoteTests.cs

19 lines
429 B
C#
Raw Normal View History

2011-02-09 00:05:32 +00:00
using NUnit.Framework;
namespace VideoGameQuotes.Api.Tests {
[TestFixture]
public class QuoteTests {
[Test]
public void Should_remove_old_vote_if_voting_for_same_quote() {
2011-02-09 00:05:32 +00:00
var quote = new Quote();
var user = new User();
quote.VoteFor(user, 5);
Assert.That(quote.GetTotalPoints(), Is.EqualTo(5));
2011-02-09 00:05:32 +00:00
quote.VoteFor(user, 7);
Assert.That(quote.GetTotalPoints(), Is.EqualTo(7));
2011-02-09 00:05:32 +00:00
}
}
}