use of it.vige.rubia.model.Forum in project rubia-forums by flashboss.
the class MyForumsForumTest method verifyRegisteredAuthorizedForums.
@Test
public void verifyRegisteredAuthorizedForums() {
List<Forum> forums = viewAllForums(driver);
for (Forum forum : forums) {
assertTrue(isRegistered(driver, forum));
}
Forum fourthForum = new Forum("Fourth Test Forum");
goTo(driver, fourthForum);
assertTrue(!isRegistered(driver, fourthForum));
assertEquals("First Test Forum", forums.get(0).getName());
assertEquals("Second Test Forum", forums.get(1).getName());
assertEquals("Third Test Forum", forums.get(2).getName());
assertEquals("Fifth Test with Truncation over 25 characters Forum", forums.get(3).getName());
assertEquals(4, forums.size());
}
use of it.vige.rubia.model.Forum in project rubia-forums by flashboss.
the class MyForumsForumTest 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") })));
assertTrue(message.equals(OK));
message = removeTopic(driver, new Topic(new Forum("First Test Forum"), "Second Test Topic", asList(new Post[] { new Post("Second Test Body") })));
assertTrue(message.equals(OK));
message = removeTopic(driver, new Topic(new Forum("Second Test Forum"), "Third Test Topic", asList(new Post[] { new Post("Third Test Body") })));
assertTrue(message.equals(OK));
message = removeTopic(driver, new Topic(new Forum("Second Test Forum"), "Fourth Test Topic", asList(new Post[] { new Post("Fourth Test Body") })));
assertTrue(message.equals(OK));
Forum forum = new Forum("First Test Forum");
message = unregisterForum(driver, forum);
assertTrue(message.equals(OK));
message = removeForum(driver, forum, "Third Test Forum");
assertTrue(message.equals(REMOVED_FORUM_0_MESSAGE));
forum = new Forum("Second Test Forum");
message = unregisterForum(driver, forum);
assertTrue(message.equals(OK));
message = removeForum(driver, forum, SELECT_FORUM_TYPE);
assertTrue(message.equals(REMOVED_FORUM_1_MESSAGE));
forum = new Forum("Third Test Forum");
message = viewAllForumsRemoveForum(driver, forum);
assertTrue(message.equals(OK));
message = removeForum(driver, forum, SELECT_FORUM_TYPE);
assertTrue(message.equals(REMOVED_FORUM_2_MESSAGE));
forum = new Forum("Fourth Test Forum");
message = removeForum(driver, forum, SELECT_FORUM_TYPE);
assertTrue(message.equals(REMOVED_FORUM_3_MESSAGE));
forum = new Forum("Fifth Test with Truncation over 25 characters Forum");
message = viewAllEditForumsRemoveForum(driver, forum);
assertTrue(message.equals(OK));
message = removeForum(driver, forum, SELECT_FORUM_TYPE);
assertTrue(message.equals(REMOVED_FORUM_4_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.Forum in project rubia-forums by flashboss.
the class MyForumsForumTest 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));
Forum forum = new Forum("First Test Forum", "First Test Description", new Category("First Test Category"));
message = createForum(driver, forum);
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(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 = registerForum(driver, forum, EMAIL_LINKED_NOTIFICATION, CONFIRM);
assertTrue(message.equals("First Test Forum"));
forum = new Forum("Second Test Forum", "Second Test Description", new Category("First Test Category"));
message = createForum(driver, forum);
assertTrue(message.equals(CREATED_FORUM_1_MESSAGE));
message = createTopic(driver, new Topic(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(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 = registerForum(driver, forum, EMAIL_EMBEDED_NOTIFICATION, CONFIRM);
assertTrue(message.equals("Second Test Forum"));
forum = new Forum("Third Test Forum", "Third Test Description", new Category("Second Test Category"));
message = createForum(driver, forum);
assertTrue(message.equals(CREATED_FORUM_2_MESSAGE));
message = registerForum(driver, forum, EMAIL_NO_NOTIFICATION, CONFIRM);
assertTrue(message.equals("Third Test Forum"));
forum = new Forum("Fourth Test Forum", "Fourth Test Description", new Category("Second Test Category"));
message = createForum(driver, forum);
assertTrue(message.equals(CREATED_FORUM_3_MESSAGE));
forum = new Forum("Fifth Test with Truncation over 25 characters Forum", "Fifth Test Description", new Category("Second Test Category"));
message = createForum(driver, forum);
assertTrue(message.equals(CREATED_FORUM_4_MESSAGE));
message = registerForum(driver, forum, EMAIL_NO_NOTIFICATION, CONFIRM);
assertTrue(message.equals("Fifth Test with Truncation over 25 characters Forum"));
}
use of it.vige.rubia.model.Forum in project rubia-forums by flashboss.
the class MyForumsForumTest method verifyUpdatedForum.
@Test
public void verifyUpdatedForum() {
Forum forum = new Forum("Second Test Forum");
String notificationType = viewAllForumsUpdateForum(driver, forum, EMAIL_NO_NOTIFICATION);
assertEquals(EMAIL_NO_NOTIFICATION.toString(), notificationType);
notificationType = viewAllForumsUpdateForum(driver, forum, EMAIL_EMBEDED_NOTIFICATION);
assertEquals(EMAIL_EMBEDED_NOTIFICATION.toString(), notificationType);
}
use of it.vige.rubia.model.Forum in project rubia-forums by flashboss.
the class ModerateTopicTest method lock.
@Test
public void lock() {
Forum forum = new Forum("Second Test Forum");
Topic topic = new Topic(forum, "Third Test Topic");
String message = lockTopic(driver, topic);
assertEquals(SUCC_TOPIC_LOCKED, message);
message = createPost(driver, new Post(topic, "new Test Post"));
assertEquals(LOCKED, message);
message = lockTopic(driver, topic);
assertEquals(SUCC_TOPIC_UNLOCKED, message);
}
Aggregations