Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

7. Application Logic > Building Questions from JSON

Building Questions from JSON

Having decided how the BrowseOverflow app will retrieve the data describing questions from the Stack Overflow website, we can use that data to create the question objects. It’s time to flesh out the implementation of QuestionBuilder and to create a new test fixture called QuestionBuilderTests to describe this implementation. Incidentally, this raises a question about class naming: If we’re testing question construction in QuestionBuilderTests, just what was QuestionCreationTests for? It’s a valid question; the class names both suggest that they’re responsible for the same thing. I’m going to rename QuestionCreationTests to QuestionCreationWorkflowTests, because that class is really testing how the app interacts with the question-creation machinery and isn’t about the nuts and bolts of building question objects.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint