As a user, I want browse questions. - CMPUT301F14T06/Team06MapleSyrup GitHub Wiki
Use Case: User can browse questions
Use Case Name: BrowseQuestions
Participating Actors: User
Goal: Browse questions
Trigger: Go to the main fragment
Precondition: Open the application successfully
Postcondition: On success, List of Questions with title and partial of the question content are displayed
Basic Flow:
1. User goes to the main fragment
2. App fetch data
3. App display
4. App display questions' topic list
Exceptions:
2.0 Internet is not connected
- 2.1 A Toast shows no internet access
- 2.2 Click profile button on the bottom menu and choose local questions to browse local cached questions.
Test:
-
the apps shows the currently Questions to the main page.
-
User can see Questions' topic list
In the MainActivity, confirm question topic can be browsed.
Java test cases:
InputsListModel questionList = new InputsListModel();
// add new topic to the list
for(int i=0; i<20; i++){
Question q = new Question("A question", "A author", "A title",imageList);
questionList.addQuestion(q);
}
assertEquals("add 20 questions",
questionList.size(),20);