aaOpenSource / aaLog

A library and example programs for reading the standard SMC log file format
MIT License
13 stars 15 forks source link

Have unit tests use property-by-property assertions #28

Closed logic-danderson closed 8 years ago

logic-danderson commented 8 years ago

In regards to issue #22. Changed the aaLogReader and aaLgxReader unit tests so that they verify objects property-by-property. This makes it easier to accommodate the differences between our development machines than serializing the whole object to a string and making a comparison from there. And the description from the assertion tells you exactly which property has a problem.

Thankfully the header and record objects expose the raw date time numeric values, so that makes testing around time zones moot. Those numbers are always the same regardless of which time zone we're in. So the tests compare the numbers, not the DateTime equivalents.