Thursday, 21 September 2017
NExpect level 3: you are the key component
Retrieving the post... Please hold.
If the post doesn't load properly, you can check it out here:
https://raw.githubusercontent.com/fluffynuts/blog/master/20170917_NExpectLevel3.md
NExpect level 2: testing collections
Retrieving the post... Please hold.
If the post doesn't load properly, you can check it out here:
https://raw.githubusercontent.com/fluffynuts/blog/master/20170917_NExpectLevel2.md
NExpect level 1: testing objects and values
Retrieving the post... Please hold.
If the post doesn't load properly, you can check it out here:
https://raw.githubusercontent.com/fluffynuts/blog/master/20170917_NExpectLevel1.md
Monday, 18 September 2017
Fluent, descriptive testing with NExpect
Retrieving the post... Please hold.
If the post doesn't load properly, you can check it out here:
https://github.com/fluffynuts/blog/blob/master/20180918_IntroducingNExpect.md
This week in PeanutButter
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 (:
Subscribe to:
Posts (Atom)
What's new in PeanutButter?
Retrieving the post... Please hold. If the post doesn't load properly, you can check it out here: https://github.com/fluffynuts/blog/...
-
So here's a neat little thing that I learned tonight: how to run a script after a specific package is installed or updated. Why? Bec...
-
There was a time when INI files ruled the world of configuration. Since then, we've been told on numerous occasions by many people that ...
-
Introducing... Peanut Butter! I've been writing code for about 15 years now. It's not really that long, considering the amount of...