use of org.mamute.model.vote.MassiveVote in project mamute by caelum.
the class VoteDAOTest method beforeTest.
@Before
public void beforeTest() {
votes = new VoteDAO(session);
currentUser = user("Current User", "currentUser@email.com");
otherUser = user("Other User", "otherUser@email.com");
session.save(otherUser);
session.save(currentUser);
tags.add(tag("bla"));
for (Tag tag : tags) {
session.save(tag);
}
InvisibleForUsersRule invisibleRule = new InvisibleForUsersRule(new LoggedUser(currentUser, null));
votingMachine = new VotingMachine(votes, new KarmaCalculator(), new ReputationEventDAO(session, invisibleRule), new MassiveVote(), new RetrieveKarmaDownvote());
}
use of org.mamute.model.vote.MassiveVote in project mamute by caelum.
the class VotingMachineTest method setUp.
@Before
public void setUp() {
votes = mock(VoteDAO.class);
ReputationEventDAO reputationEvents = mock(ReputationEventDAO.class);
votingMachine = new VotingMachine(votes, new KarmaCalculator(), reputationEvents, new MassiveVote(), new RetrieveKarmaDownvote());
voter = user("chico", "chico@brutal.com", 1l);
author = user("author", "author@brutal.com", 2l);
votable = question.withTitle("title").withDescription("description").withAuthor(author).build();
}
use of org.mamute.model.vote.MassiveVote in project mamute by caelum.
the class MassiveVoteTest method setUp.
@Before
public void setUp() throws Exception {
massiveVote = new MassiveVote();
author = user("Felipe", "gato-sem-gata@lalala.bla");
massiveVoter = user("MassiveWolter", "massive-wolter@bla.bla");
}
Aggregations