code /
plexi /
fs /
d73320bea856dd742438f34506fe9d769bd983d6 Add FsAdaptorTest and supporting test infrastructure
This adds unit tests for the FsAdaptor class, including a bunch
of supporting test classes. The changes include:
FsAdaptorTest: 49 Unit tests for FsAdaptor class
FsAdaptor: Added a test constructor that takes a FileDelegate arg, made some
methods and inner classes VisibleForTesting
HtmlResponseWriter: Fixed array bounds exception for unix paths
MockFile: A lightweight, in-memory file system
MockFileTest: Sanity checks for MockFile
MockFileDelgate: A FileDelegate backed by MockFiles
MockFileDelegateTest: Sanity checks for MockFileDelegate
MockAdaptorContext: A AdaptorContext wrapping AccumlatingDocIdPusher
MockRequest: A trivial Request implementation
MockResponse: A Response that supports only the features used by the adaptor
AccumulatingDocIdPusher: Imported from SP adaptor and heavily modified
UnsupportedDocIdPusher: Parent class of AccumulatingDocId pusher
MockDocIdCodec: Imported from adaptor framework tests
These unit tests provide 91% code coverage for the FsAdaptor class.
Code Review: https://codereview.appspot.com/58560043/
13 files changed