Search in sources :

Example 21 with Tag

use of org.mamute.model.Tag in project mamute by caelum.

the class SolrQuestionIndexTest method setup.

@Before
public void setup() throws IOException, SolrServerException, InterruptedException {
    author = new User(fromTrustedText("Leonardo"), "leo@leo");
    eli5 = new Tag("eli5", "Explain Like I'm 5", author);
    eli12 = new Tag("eli12", "Explain Like I'm 12", author);
    science = new Tag("science", "Science!", author);
    hobby = new Tag("hobby", "Hobbies and stuff", author);
    whyIsSkyBlue = createQuestion(1L, "Why is the sky blue?", "I wanna know why is sky blue", science, eli5);
    whereDoBabiesComeFrom = createQuestion(2L, "Where do babies come from?", "My mom said I came from a bird", science, eli12);
    howShipInBottle = createQuestion(3L, "How do they get the ship in the bottle?", "I wanna know this for my school work", hobby);
}
Also used : User(org.mamute.model.User) Tag(org.mamute.model.Tag) Before(org.junit.Before)

Aggregations

Tag (org.mamute.model.Tag)21 Question (org.mamute.model.Question)9 Test (org.junit.Test)8 User (org.mamute.model.User)7 Before (org.junit.Before)5 LoggedUser (org.mamute.model.LoggedUser)5 Get (br.com.caelum.vraptor.Get)3 ArrayList (java.util.ArrayList)3 Answer (org.mamute.model.Answer)3 CustomBrutauthRules (br.com.caelum.brutauth.auth.annotations.CustomBrutauthRules)2 Post (br.com.caelum.vraptor.Post)2 InvisibleForUsersRule (org.mamute.dao.InvisibleForUsersRule)2 UserSummaryForTag (org.mamute.dto.UserSummaryForTag)2 Attachment (org.mamute.model.Attachment)2 QuestionInformation (org.mamute.model.QuestionInformation)2 QuestionInformationBuilder (org.mamute.model.QuestionInformationBuilder)2 ReputationEvent (org.mamute.model.ReputationEvent)2 TagPage (org.mamute.model.TagPage)2 Environment (br.com.caelum.vraptor.environment.Environment)1 VRaptorTestResult (br.com.caelum.vraptor.test.VRaptorTestResult)1