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

Chapter 25. Building and Storing Annotat... > Step 3: Writing and Performing Unit ...

Step 3: Writing and Performing Unit Tests

The problem with writing annotations is that they are used by other content objects. The correct way of writing the tests for the annotations adapter would be to develop dummy content objects. But in order to keep the testing code as small as possible, you can just depend on some of the existing content implementations, namely Folder and File. The most well-defined annotation is probably ZopeDublinCore, and you can use it to declare and test some annotations.

You should use doc strings to write the tests. The doc string tests are not listed in this chapter, but you can find the test code in the class doc string of KeeperAnnotations at http://svn.zope.org/book/trunk/keeperannotations/.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint