use of it.vige.rubia.model.Category in project rubia-forums by flashboss.
the class MyForumsTopicTest method stop.
@AfterClass
public static void stop() {
Topic topic = new Topic(new Forum("First Test Forum"), "First Test Topic", asList(new Post[] { new Post("First Test Body") }));
String message = unregisterTopic(driver, topic);
assertTrue(message.equals(OK));
message = removeTopic(driver, topic);
assertTrue(message.equals(OK));
topic = new Topic(new Forum("First Test Forum"), "Second Test Topic", asList(new Post[] { new Post("Second Test Body") }));
message = unregisterTopic(driver, topic);
assertTrue(message.equals(OK));
message = removeTopic(driver, topic);
assertTrue(message.equals(OK));
topic = new Topic(new Forum("Second Test Forum"), "Third Test Topic", asList(new Post[] { new Post("Third Test Body") }));
message = unregisterTopic(driver, topic);
assertTrue(message.equals(OK));
message = removeTopic(driver, topic);
assertTrue(message.equals(OK));
topic = new Topic(new Forum("Second Test Forum"), "Fourth Test Topic", asList(new Post[] { new Post("Fourth Test Body") }));
message = viewAllTopicsRemoveTopic(driver, topic);
assertTrue(message.equals(OK));
message = removeTopic(driver, topic);
assertTrue(message.equals(OK));
topic = new Topic(new Forum("Third Test Forum"), "Fifth Test with Truncation over 25 characters Topic", asList(new Post[] { new Post("Fifth Test with Truncation over 25 characters Body") }));
message = viewAllTopicsRemoveTopic(driver, topic);
assertTrue(message.equals(OK));
message = removeTopic(driver, topic);
assertTrue(message.equals(OK));
topic = new Topic(new Forum("Third Test Forum"), "Sixth Test Topic", asList(new Post[] { new Post("Sixth Test Body") }));
message = removeTopic(driver, topic);
assertTrue(message.equals(OK));
message = removeForum(driver, new Forum("First Test Forum"), "Second Test Forum");
assertTrue(message.equals(REMOVED_FORUM_0_MESSAGE));
message = removeForum(driver, new Forum("Second Test Forum"), SELECT_FORUM_TYPE);
assertTrue(message.equals(REMOVED_FORUM_1_MESSAGE));
message = removeForum(driver, new Forum("Third Test Forum"), SELECT_FORUM_TYPE);
assertTrue(message.equals(REMOVED_FORUM_2_MESSAGE));
message = removeCategory(driver, new Category("First Test Category"), SELECT_CATEGORY_TYPE);
assertTrue(message.equals(REMOVED_CATEGORY_0_MESSAGE));
message = removeCategory(driver, new Category("Second Test Category"), SELECT_CATEGORY_TYPE);
assertTrue(message.equals(REMOVED_CATEGORY_1_MESSAGE));
}
use of it.vige.rubia.model.Category in project rubia-forums by flashboss.
the class ExternalLinksTest method stop.
@AfterClass
public static void stop() {
String message = removeTopic(driver, new Topic(new Forum("First Test Forum"), "First Test Topic", asList(new Post[] { new Post("First Test Body"), new Post("Second Test Body") })));
assertTrue(message.equals(OK));
Forum forum = new Forum("First Test Forum");
message = removeForum(driver, forum, SELECT_FORUM_TYPE);
assertTrue(message.equals(REMOVED_FORUM_0_MESSAGE));
message = removeCategory(driver, new Category("First Test Category"), SELECT_CATEGORY_TYPE);
assertTrue(message.equals(REMOVED_CATEGORY_0_MESSAGE));
}
use of it.vige.rubia.model.Category in project rubia-forums by flashboss.
the class ModerateForumTest method stop.
@AfterClass
public static void stop() {
Forum firstForum = new Forum("First Test Forum");
firstForum.setTopics(asList(new Topic[] { new Topic("First Test Topic"), new Topic("Second Test Topic") }));
Forum secondForum = new Forum("Second Test Forum");
secondForum.setTopics(asList(new Topic[] { new Topic("Third Test Topic"), new Topic("Fourth Test Topic") }));
Forum thirdForum = new Forum("Third Test Forum");
thirdForum.setTopics(asList(new Topic[] { new Topic("Fifth Test with Truncation over 25 characters Topic"), new Topic("Sixth Test Topic") }));
goToModerate(driver, firstForum);
String message = removeForum(driver, CANCEL, firstForum);
assertTrue(message.equals(""));
goToModerate(driver, firstForum);
message = removeForum(driver, CONFIRM, firstForum);
assertTrue(message.equals(NOT_SELECTED_MESSAGE));
message = removeForum(driver, CONFIRM, firstForum);
assertTrue(message.equals(REMOVED_FORUM_MESSAGE));
goToModerate(driver, secondForum);
message = removeForum(driver, CONFIRM, secondForum);
assertTrue(message.equals(REMOVED_FORUM_MESSAGE));
goToModerate(driver, thirdForum);
message = removeForum(driver, CONFIRM, thirdForum);
assertTrue(message.equals(REMOVED_FORUM_MESSAGE));
message = removeCategory(driver, new Category("First Test Category"), SELECT_CATEGORY_TYPE);
assertTrue(message.equals(REMOVED_CATEGORY_0_MESSAGE));
message = removeCategory(driver, new Category("Second Test Category"), SELECT_CATEGORY_TYPE);
assertTrue(message.equals(REMOVED_CATEGORY_1_MESSAGE));
}
use of it.vige.rubia.model.Category in project rubia-forums by flashboss.
the class ModerateForumTest method setUp.
@BeforeClass
public static void setUp() {
driver.get(HOME_URL);
String message = createCategory(driver, new Category("First Test Category"));
assertTrue(message.equals(CREATED_CATEGORY_1_MESSAGE));
message = createCategory(driver, new Category("Second Test Category"));
assertTrue(message.equals(CREATED_CATEGORY_2_MESSAGE));
message = createForum(driver, new Forum("First Test Forum", "First Test Description", new Category("First Test Category")));
assertTrue(message.equals(CREATED_FORUM_0_MESSAGE));
message = createTopic(driver, new Topic(new Forum("First Test Forum"), "First Test Topic", asList(new Post[] { new Post("First Test Body", asList(new Attachment("first", "First Test File"), new Attachment("second", "Second Test File"), new Attachment("third", "Third Test File"))) }), NORMAL, new Poll("First Test Question", asList(new PollOption[] { new PollOption("First Test Answer"), new PollOption("Second Test Answer") }), 4)));
assertTrue(message.equals("First Test Topic"));
message = createTopic(driver, new Topic(new Forum("First Test Forum"), "Second Test Topic", asList(new Post[] { new Post("Second Test Body", asList(new Attachment("first", "First Test File"), new Attachment("second", "Second Test File"), new Attachment("third", "Third Test File"))) }), IMPORTANT, new Poll("Second Test Question", asList(new PollOption[] { new PollOption("Third Test Answer"), new PollOption("Fourth Test Answer") }), 8)));
assertTrue(message.equals("Second Test Topic"));
message = createForum(driver, new Forum("Second Test Forum", "Second Test Description", new Category("First Test Category")));
assertTrue(message.equals(CREATED_FORUM_1_MESSAGE));
message = createTopic(driver, new Topic(new Forum("Second Test Forum"), "Third Test Topic", asList(new Post[] { new Post("Third Test Body", asList(new Attachment("first", "First Test File"), new Attachment("second", "Second Test File"), new Attachment("third", "Third Test File"))) }), ADVICE, new Poll("Third Test Question", asList(new PollOption[] { new PollOption("Fifth Test with Truncation over 25 characters Answer"), new PollOption("Sixth Test Answer") }), 9)));
assertTrue(message.equals("Third Test Topic"));
message = createTopic(driver, new Topic(new Forum("Second Test Forum"), "Fourth Test Topic", asList(new Post[] { new Post("Fourth Test Body", asList(new Attachment("fourth", "Fourth Test File"), new Attachment("fifth", "Fifth Test with Truncation over 25 characters File"), new Attachment("sixth", "Sixth Test File"))) }), IMPORTANT, new Poll("Fourth Test Question", asList(new PollOption[] { new PollOption("Seventh Test Answer"), new PollOption("Eight Test Answer") }), 0)));
assertTrue(message.equals("Fourth Test Topic"));
message = createForum(driver, new Forum("Third Test Forum", "Third Test Description", new Category("Second Test Category")));
assertTrue(message.equals(CREATED_FORUM_2_MESSAGE));
message = createTopic(driver, new Topic(new Forum("Third Test Forum"), "Fifth Test with Truncation over 25 characters Topic", asList(new Post[] { new Post("Fifth Test with Truncation over 25 characters Body", asList(new Attachment("seventh", "Seventh Test File"), new Attachment("eight", "Eight Test File"), new Attachment("ninth", "Ninth Test File"))) }), IMPORTANT, new Poll("Third Test Question", asList(new PollOption[] { new PollOption("Seventh Test Answer"), new PollOption("Eight Test Answer") }), 8)));
assertTrue(message.equals("Fifth Test with Truncation over 25 characters Topic"));
message = createTopic(driver, new Topic(new Forum("Third Test Forum"), "Sixth Test Topic", asList(new Post[] { new Post("Sixth Test Body", asList(new Attachment("ten", "Ten Test File"), new Attachment("eleven", "Eleven Test File"), new Attachment("twelve", "Twelve Test File"))) }), IMPORTANT, new Poll("Fourth Test Question", asList(new PollOption[] { new PollOption("Ninth Test Answer"), new PollOption("Ten Test Answer") }), 8)));
assertTrue(message.equals("Sixth Test Topic"));
}
use of it.vige.rubia.model.Category in project rubia-forums by flashboss.
the class SearchPostTest method setUp.
@BeforeClass
public static void setUp() {
driver.get(HOME_URL);
String message = createCategory(driver, new Category("First Test Category"));
assertTrue(message.equals(CREATED_CATEGORY_1_MESSAGE));
message = createCategory(driver, new Category("Second Test Category"));
assertTrue(message.equals(CREATED_CATEGORY_2_MESSAGE));
message = createForum(driver, new Forum("First Test Forum", "First Test Description", new Category("First Test Category")));
assertTrue(message.equals(CREATED_FORUM_0_MESSAGE));
message = createTopic(driver, new Topic(new Forum("First Test Forum"), "First Test Topic", asList(new Post[] { new Post("First Test Body", asList(new Attachment("first", "First Test File"), new Attachment("second", "Second Test File"), new Attachment("third", "Third Test File"))) }), NORMAL, new Poll("First Test Question", asList(new PollOption[] { new PollOption("First Test Answer"), new PollOption("Second Test Answer") }), 4)));
assertTrue(message.equals("First Test Topic"));
message = registerTopic(driver, new Topic("First Test Topic"), EMAIL_LINKED_NOTIFICATION, CONFIRM);
assertTrue(message.equals("First Test Topic"));
message = createTopic(driver, new Topic(new Forum("First Test Forum"), "Second Test Topic", asList(new Post[] { new Post("Second Test Body", asList(new Attachment("first", "First Test File"), new Attachment("second", "Second Test File"), new Attachment("third", "Third Test File"))) }), IMPORTANT, new Poll("Second Test Question", asList(new PollOption[] { new PollOption("Third Test Answer"), new PollOption("Fourth Test Answer") }), 8)));
assertTrue(message.equals("Second Test Topic"));
message = registerTopic(driver, new Topic("Second Test Topic"), EMAIL_EMBEDED_NOTIFICATION, CONFIRM);
assertTrue(message.equals("Second Test Topic"));
message = createForum(driver, new Forum("Second Test Forum", "Second Test Description", new Category("First Test Category")));
assertTrue(message.equals(CREATED_FORUM_1_MESSAGE));
message = createTopic(driver, new Topic(new Forum("Second Test Forum"), "Third Test Topic", asList(new Post[] { new Post("Third Test Body", asList(new Attachment("first", "First Test File"), new Attachment("second", "Second Test File"), new Attachment("third", "Third Test File"))) }), ADVICE, new Poll("Third Test Question", asList(new PollOption[] { new PollOption("Fifth Test with Truncation over 25 characters Answer"), new PollOption("Sixth Test Answer") }), 9)));
assertTrue(message.equals("Third Test Topic"));
message = registerTopic(driver, new Topic("Third Test Topic"), EMAIL_NO_NOTIFICATION, CONFIRM);
assertTrue(message.equals("Third Test Topic"));
message = createTopic(driver, new Topic(new Forum("Second Test Forum"), "Fourth Test Topic", asList(new Post[] { new Post("Fourth Test Body", asList(new Attachment("fourth", "Fourth Test File"), new Attachment("fifth", "Fifth Test with Truncation over 25 characters File"), new Attachment("sixth", "Sixth Test File"))) }), IMPORTANT, new Poll("Fourth Test Question", asList(new PollOption[] { new PollOption("Seventh Test Answer"), new PollOption("Eight Test Answer") }), 0)));
assertTrue(message.equals("Fourth Test Topic"));
message = registerTopic(driver, new Topic("Fourth Test Topic"), EMAIL_EMBEDED_NOTIFICATION, CONFIRM);
assertTrue(message.equals("Fourth Test Topic"));
message = createForum(driver, new Forum("Third Test Forum", "Third Test Description", new Category("Second Test Category")));
assertTrue(message.equals(CREATED_FORUM_2_MESSAGE));
message = createTopic(driver, new Topic(new Forum("Third Test Forum"), "Fifth Test with Truncation over 25 characters Topic", asList(new Post[] { new Post("Fifth Test with Truncation over 25 characters Body", asList(new Attachment("seventh", "Seventh Test File"), new Attachment("eight", "Eight Test File"), new Attachment("ninth", "Ninth Test File"))) }), IMPORTANT, new Poll("Third Test Question", asList(new PollOption[] { new PollOption("Seventh Test Answer"), new PollOption("Eight Test Answer") }), 8)));
assertTrue(message.equals("Fifth Test with Truncation over 25 characters Topic"));
message = registerTopic(driver, new Topic("Fifth Test with Truncation over 25 characters Topic"), EMAIL_EMBEDED_NOTIFICATION, CONFIRM);
assertTrue(message.equals("Fifth Test with Truncation over 25 characters Topic"));
message = createTopic(driver, new Topic(new Forum("Third Test Forum"), "Sixth Test Topic", asList(new Post[] { new Post("Sixth Test Body", asList(new Attachment("ten", "Ten Test File"), new Attachment("eleven", "Eleven Test File"), new Attachment("twelve", "Twelve Test File"))) }), IMPORTANT, new Poll("Fourth Test Question", asList(new PollOption[] { new PollOption("Ninth Test Answer"), new PollOption("Ten Test Answer") }), 8)));
assertTrue(message.equals("Sixth Test Topic"));
}
Aggregations