use of org.mamute.integration.util.DaoManager in project mamute by caelum.
the class CommentQuestionTest method login.
@Before
public void login() {
DaoManager manager = new DaoManager();
User author = manager.randomUser();
manager.createQuestion(author);
}
use of org.mamute.integration.util.DaoManager in project mamute by caelum.
the class VoteUpDownTest method login.
@Before
public void login() {
DaoManager manager = new DaoManager();
User author = manager.randomUser();
Question question = manager.createQuestion(author);
manager.answerQuestion(author, question);
loginWithALotOfKarma();
questionPage = home().toFirstQuestionPage();
}
use of org.mamute.integration.util.DaoManager in project mamute by caelum.
the class EditQuestionTest method should_touch_question.
@Test
public void should_touch_question() throws Exception {
User user = new DaoManager().randomUser();
Question question = createQuestionWithDao(user(user.getEmail()), "Question question question question question", "Description description description description description", tag("java"));
UserFlow navigation = login(navigate(), user.getEmail());
navigation = editQuestionWithFlow(navigation, question, "ASdoA sodi aosido iasod iOASIDoIASOdi", "asd oiasudo iausdoi uasoid uaosiduasoduoasi udaiosud oiasud oiasud oisa", "so diaos diaosi d", "java");
VRaptorTestResult editedQuestion = navigation.followRedirect().execute();
editedQuestion.wasStatus(200).isValid();
Elements questionElements = getElementsByClass(editedQuestion.getResponseBody(), "edited-touch");
Elements touchImage = getElementsByTag(questionElements.html(), "img");
assertTrue(touchImage.isEmpty());
navigation = login(navigate(), moderator().getEmail());
navigation = editQuestionWithFlow(navigation, question, "Question question question question question", "Description description description description description", "new comment", "java");
editedQuestion = navigation.followRedirect().execute();
editedQuestion.wasStatus(200).isValid();
questionElements = getElementsByClass(editedQuestion.getResponseBody(), "edited-touch");
touchImage = getElementsByTag(questionElements.html(), "img");
assertFalse(touchImage.isEmpty());
}
use of org.mamute.integration.util.DaoManager in project mamute by caelum.
the class ForgotPasswordTest method setup.
@Before
public void setup() throws IOException {
manager = new DaoManager();
user = manager.randomUser();
password = "newpass";
}
use of org.mamute.integration.util.DaoManager in project mamute by caelum.
the class CommentAnswerTest method login.
@Before
public void login() {
DaoManager manager = new DaoManager();
User author = manager.randomUser();
Question question = manager.createQuestion(author);
manager.answerQuestion(author, question);
}
Aggregations