19 lines
429 B
C#
19 lines
429 B
C#
using NUnit.Framework;
|
|
|
|
namespace VideoGameQuotes.Api.Tests {
|
|
[TestFixture]
|
|
public class QuoteTests {
|
|
[Test]
|
|
public void Should_remove_old_vote_if_voting_for_same_quote() {
|
|
var quote = new Quote();
|
|
var user = new User();
|
|
|
|
quote.VoteFor(user, 5);
|
|
Assert.That(quote.GetTotalPoints(), Is.EqualTo(5));
|
|
|
|
quote.VoteFor(user, 7);
|
|
Assert.That(quote.GetTotalPoints(), Is.EqualTo(7));
|
|
}
|
|
}
|
|
}
|