Skip to content
Snippets Groups Projects
Commit ecfd5819 authored by Matthew Williams's avatar Matthew Williams
Browse files

Clean up comments for merge to master

parent 0a98063c
No related branches found
No related tags found
1 merge request!23Merge UC30 into Master
......@@ -26,7 +26,6 @@ public class MessageFilterTest extends iTrustSeleniumTest {
public void testEditFilter() throws Exception {
// This logs us into iTrust and returns the HtmlUnitDriver for use in
// this case
HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
// Make sure we were able to log in
......@@ -52,7 +51,6 @@ public class MessageFilterTest extends iTrustSeleniumTest {
public void testFilterPersistence() throws Exception {
// This logs us into iTrust and returns the HtmlUnitDriver for use in
// this case
HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
// Make sure we were able to log in
......@@ -82,6 +80,7 @@ public class MessageFilterTest extends iTrustSeleniumTest {
driver2.findElement(By.cssSelector("h2.panel-title")).click();
driver2.findElement(By.linkText("Message Outbox")).click();
// Don't insert anything, just check what's already inputted
driver2.findElement(By.linkText("Edit Filter")).click();
text = driver2.findElementById("subject").getAttribute("value");
assertTrue("Filters are not persistent between sessions", text.contains("Scratchy Throat"));
......@@ -91,7 +90,6 @@ public class MessageFilterTest extends iTrustSeleniumTest {
public void testSortMessages() throws Exception {
// This logs us into iTrust and returns the HtmlUnitDriver for use in
// this case
HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
// Make sure we were able to log in
......
......@@ -10,6 +10,7 @@ import edu.ncsu.csc.itrust.exception.ITrustException;
import edu.ncsu.csc.itrust.unit.datagenerators.TestDataGenerator;
import edu.ncsu.csc.itrust.unit.testutils.TestDAOFactory;
import edu.ncsu.csc.itrust.exception.FormValidationException;
import org.junit.Test;
public class EditPatientActionTest extends TestCase {
private DAOFactory factory = TestDAOFactory.getTestInstance();
......@@ -172,6 +173,9 @@ public class EditPatientActionTest extends TestCase {
}
/**
* Test that the filter will persist at the database level
*
* @throws Exception
*
*/
public void testEditMessageFilter() throws Exception {
......
......@@ -82,6 +82,9 @@ public class EditPersonnelActionTest extends TestCase {
}
/**
* Test that the filter will persist at the database level
*
* @throws Exception
*
*/
public void testEditMessageFilter() throws Exception {
......
......@@ -303,7 +303,9 @@ public class ViewMyMessagesActionTest extends TestCase {
}
/**
* Test that filtering by MID works properly
*
* @throws Exception
*/
public void testFilterSentMessagesByMID() throws Exception {
// Check that we actually have messages to filter
......@@ -322,7 +324,9 @@ public class ViewMyMessagesActionTest extends TestCase {
}
/**
* Test that filtering by subject works properly
*
* @throws Exception
*/
public void testFilterSentMessagesBySubject() throws Exception {
// Check that we actually have messages to filter
......@@ -341,7 +345,9 @@ public class ViewMyMessagesActionTest extends TestCase {
}
/**
* Test that the specified word is included within the body or the subject line
*
* @throws Exception
*/
public void testFilterSentMessagesByContentInclusion() throws Exception {
// Check that we actually have messages to filter
......@@ -353,13 +359,15 @@ public class ViewMyMessagesActionTest extends TestCase {
List<MessageBean> filteredMessages = action.filterSentMessages(unfilteredMessages, ",,throat,,,");
for (MessageBean m : filteredMessages) {
if (!m.getSubject().toLowerCase().contains("throat") && !m.getBody().toLowerCase().contains("throat")) {
fail("One of the filtered messages contained throat in the subject or body, and it shouldn't have");
fail("Messages filtered should have the word throat in the body or subject");
}
}
}
/**
* Test that the specified word is not included within the body or subject line
*
* @throws Exception
*/
public void testFilterSentMessagesByContentExclusion() throws Exception {
// Check that we actually have messages to filter
......@@ -376,7 +384,9 @@ public class ViewMyMessagesActionTest extends TestCase {
}
/**
* Test that the messages selected have been sent after the starting date
*
* @throws Exception
*/
public void testFilterSentMessagesByStartingDate() throws Exception {
// Check that we actually have messages to filter
......@@ -394,7 +404,9 @@ public class ViewMyMessagesActionTest extends TestCase {
}
/**
* Test that the messages selected have been sent before the end date
*
* @throws Exception
*/
public void testFilterSentMessagesByEndingDate() throws Exception {
// Check that we actually have messages to filter
......@@ -410,7 +422,9 @@ public class ViewMyMessagesActionTest extends TestCase {
}
/**
* Test a bunch of complex queries with multiple filters
*
* @throws Exception
*/
public void testFilterSentMessagesComplexFilter() throws Exception {
// Check that we actually have messages to filter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment