Revision: 1776
Author: [email protected]
Date: Thu Dec 10 06:47:28 2009
Log: Correct name for TestQuestion class
http://code.google.com/p/simal/source/detail?r=1776

Added:
   
/trunk/uk.ac.osswatch.simal.ssmm/src/test/uk/ac/osswatch/simal/ssmm/model/TestQuestion.java
Deleted:
   
/trunk/uk.ac.osswatch.simal.ssmm/src/test/uk/ac/osswatch/simal/ssmm/model/QuestionTest.java

=======================================
--- /dev/null
+++  
/trunk/uk.ac.osswatch.simal.ssmm/src/test/uk/ac/osswatch/simal/ssmm/model/TestQuestion.java
      
Thu Dec 10 06:47:28 2009
@@ -0,0 +1,80 @@
+package uk.ac.osswatch.simal.ssmm.model;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test base functions of the Question class.
+ *
+ */
+public class TestQuestion {
+
+       static String QUESTION_LABEL = "Test Label";
+       static String QUESTION_TEXT = "Is this a question?";
+       static String QUESTION_DETAILS = "This is just a question for testing.";
+       static String QUESTION_ANSWER = "Yes, of course it's a question.";
+
+       static Question question;
+
+       @BeforeClass
+       public static void createQuestion() {
+               question = new Question(QUESTION_LABEL, QUESTION_TEXT, 
QUESTION_DETAILS,  
QUESTION_ANSWER);
+       }
+
+       @Test
+       public void testCreateQuestion(){
+               Question test = new Question(QUESTION_LABEL, QUESTION_TEXT,  
QUESTION_DETAILS);
+               assertEquals("Question text is incorrect", QUESTION_TEXT,  
test.getText());
+               assertEquals("Description for question is not being set 
correctly",  
QUESTION_DETAILS, test.getDetails());
+       }
+
+       @Test
+       public void testGetLabel() {
+               assertEquals("Question label is incorrect", QUESTION_LABEL,  
question.getLabel());
+       }
+
+       @Test
+       public void testSetLabel() {
+               question.setLabel("testing");
+               assertEquals("Question label is not being set correctly", 
"testing",  
question.getLabel());
+               question.setLabel(QUESTION_LABEL);
+       }
+
+       @Test
+       public void testGetText() {
+               assertEquals("Question text is incorrect", QUESTION_TEXT,  
question.getText());
+       }
+
+       @Test
+       public void testSetText() {
+               question.setText("testing");
+               assertEquals("Question text is not being set correctly", 
"testing",  
question.getText());
+               question.setText(QUESTION_TEXT);
+       }
+
+       @Test
+       public void testGetAnswer() {
+               assertEquals("Answer to question is incorrect", 
QUESTION_ANSWER,  
question.getAnswer());
+       }
+
+       @Test
+       public void testSetAnswer() {
+               question.setAnswer("testing");
+               assertEquals("Answer to question is not being set correctly", 
"testing",  
question.getAnswer());
+               question.setAnswer(QUESTION_ANSWER);
+       }
+
+       @Test
+       public void testGetDescription() {
+               assertEquals("Description for question is incorrect", 
QUESTION_DETAILS,  
question.getDetails());
+       }
+
+       @Test
+       public void testSetDescription() {
+               question.setDetails("testing");
+               assertEquals("Description for question is not being set  
correctly", "testing", question.getDetails());
+               question.setDetails(QUESTION_DETAILS);
+       }
+}
=======================================
---  
/trunk/uk.ac.osswatch.simal.ssmm/src/test/uk/ac/osswatch/simal/ssmm/model/QuestionTest.java
      
Thu Dec 10 05:22:44 2009
+++ /dev/null
@@ -1,80 +0,0 @@
-package uk.ac.osswatch.simal.ssmm.model;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Test base functions of the Question class.
- *
- */
-public class QuestionTest {
-
-       static String QUESTION_LABEL = "Test Label";
-       static String QUESTION_TEXT = "Is this a question?";
-       static String QUESTION_DETAILS = "This is just a question for testing.";
-       static String QUESTION_ANSWER = "Yes, of course it's a question.";
-
-       static Question question;
-
-       @BeforeClass
-       public static void createQuestion() {
-               question = new Question(QUESTION_LABEL, QUESTION_TEXT, 
QUESTION_DETAILS,  
QUESTION_ANSWER);
-       }
-
-       @Test
-       public void testCreateQuestion(){
-               Question test = new Question(QUESTION_LABEL, QUESTION_TEXT,  
QUESTION_DETAILS);
-               assertEquals("Question text is incorrect", QUESTION_TEXT,  
test.getText());
-               assertEquals("Description for question is not being set 
correctly",  
QUESTION_DETAILS, test.getDetails());
-       }
-
-       @Test
-       public void testGetLabel() {
-               assertEquals("Question label is incorrect", QUESTION_LABEL,  
question.getLabel());
-       }
-
-       @Test
-       public void testSetLabel() {
-               question.setLabel("testing");
-               assertEquals("Question label is not being set correctly", 
"testing",  
question.getLabel());
-               question.setLabel(QUESTION_LABEL);
-       }
-
-       @Test
-       public void testGetText() {
-               assertEquals("Question text is incorrect", QUESTION_TEXT,  
question.getText());
-       }
-
-       @Test
-       public void testSetText() {
-               question.setText("testing");
-               assertEquals("Question text is not being set correctly", 
"testing",  
question.getText());
-               question.setText(QUESTION_TEXT);
-       }
-
-       @Test
-       public void testGetAnswer() {
-               assertEquals("Answer to question is incorrect", 
QUESTION_ANSWER,  
question.getAnswer());
-       }
-
-       @Test
-       public void testSetAnswer() {
-               question.setAnswer("testing");
-               assertEquals("Answer to question is not being set correctly", 
"testing",  
question.getAnswer());
-               question.setAnswer(QUESTION_ANSWER);
-       }
-
-       @Test
-       public void testGetDescription() {
-               assertEquals("Description for question is incorrect", 
QUESTION_DETAILS,  
question.getDetails());
-       }
-
-       @Test
-       public void testSetDescription() {
-               question.setDetails("testing");
-               assertEquals("Description for question is not being set  
correctly", "testing", question.getDetails());
-               question.setDetails(QUESTION_DETAILS);
-       }
-}

--

You received this message because you are subscribed to the Google Groups 
"Simal Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simal-commits?hl=en.


Reply via email to