use of it.vige.rubia.model.Category in project rubia-forums by flashboss.
the class OperationCategoryTest method verifyCreatedCategories.
@Test
public void verifyCreatedCategories() {
List<Category> categories = getCategories(driver);
List<Category> filteredCategories = new ArrayList<Category>();
for (Category category : categories) {
if (category.getTitle().equals("First Test Category") || category.getTitle().equals("Second Test Category"))
filteredCategories.add(category);
}
assertEquals(filteredCategories.size(), 2);
assertTrue(filteredCategories.get(0).getTitle().equals("First Test Category"));
assertTrue(filteredCategories.get(1).getTitle().equals("Second Test Category"));
}
use of it.vige.rubia.model.Category in project rubia-forums by flashboss.
the class OperationCategoryTest method stop.
@AfterClass
public static void stop() {
String 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 OperationTopicTest 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("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));
message = removeTopic(driver, new Topic(new Forum("Second Test Forum"), "Fifth Test with Truncation over 25 characters Topic", asList(new Post[] { new Post("Fifth Test with Truncation over 25 characters Body") })));
assertTrue(message.equals(OK));
message = removeForum(driver, new Forum("First Test Forum"), "Second Test Forum");
assertTrue(message.equals(REMOVED_FORUM_0_MESSAGE));
message = removeTopic(driver, new Topic(new Forum("Second Test Forum"), "Second Test Topic", asList(new Post[] { new Post("Second Test Body") })));
assertTrue(message.equals(OK));
message = removeForum(driver, new Forum("Second Test Forum"), SELECT_FORUM_TYPE);
assertTrue(message.equals(REMOVED_FORUM_1_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 MyForumsForumTest method verifyRegisteredCanceledForums.
@Test
public void verifyRegisteredCanceledForums() {
Forum forum = new Forum("Fourth Test Forum", "Fourth Test Description", new Category("Second Test Category"));
String message = registerForum(driver, forum, EMAIL_NO_NOTIFICATION, CANCEL);
assertTrue(message.equals("Fourth Test Forum"));
assertTrue(!isRegistered(driver, forum));
}
use of it.vige.rubia.model.Category in project rubia-forums by flashboss.
the class MyForumsForumTest method verifyAllForumsForum.
@Test
public void verifyAllForumsForum() {
Forum forum = new Forum("Third Test Forum", "Third Test Description", new Category("Second Test Category"));
Forum result = ViewAllForumsSelectForum.selectForum(driver, forum);
assertTrue(result != null);
assertEquals(forum.getName(), result.getName());
assertEquals(0, result.getTopics().size());
assertEquals(forum.getCategory().getTitle(), result.getCategory().getTitle());
}
Aggregations