Nothing major, really -- two bugfixes, which may or may not be of interest:
PropertyAssert.AreEqual
allows for comparison of nullable and non-nullable values of the same underlying type -- which especially makes sense when the actual value being tested (eg nullable int) is being compared with some concrete value (eg int).- Fix for the object extension
DeepClone()
-- some production code showed that Enum values weren't being copied correctly. So that's fixed now.
If you're wondering what this is,DeepClone()
is an extension method on all objects to provide a copy of that object, deep-cloned (so all reference types are new types, all value types are copied), much like underscore's, _.cloneDeep() for Javascript. This can be useful for comparing a "before" and "after" from a bunch of mutations, especially using theDeepEqualityTester
fromPeanutButter.Utils
or the object extensionDeepEquals()
, which does deep equality testing, much like you'd expect.
There's also been some assertion upgrading -- PeanutButter consumes, and helps to drive NExpect, an assertions library modelled after Chai for syntax and Jasmine for user-space extensibility. Head on over to Github to check it out -- though it's probably time I wrote something here about it (:
No comments:
Post a Comment