❔ Unit Testing for OpenXML
I am having trouble writing a unit test for a piece of code at work that deals with OpenXML.
Outline of the program is that the function takes in a SpreadsheetDocument object, reads it, and extracts all of the cell values into a dictionary containing a list of values (example: { "Values" : [ "Element0", "Element1", "Etc." ] }). I return this created dict.
I've tried to figure out how to write unit tests for this, but I am really struggling to do so. Can anyone give me some pointers? Thanks.
2 Replies
what kind of tests would be useful for you? not everything lends itself well to unit-testing
what difficulties have you had so far? is it conceptualising the kind of tests to write, or actually implementing them?
you could make a test like this:
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.