Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

All Our Assertion Problems

When our software outputs JSON, it can be hard to test. Consider this code: 1 2 assertThat(someJson)    .isEqualTo(expectedJson); Assuming the rendering of the resulting json matches the spacing of the expected JSON, this will work. When it doesn’t work, we get a big old string diff result telling us that the strings were different. But ...



This post first appeared on Java Code Geeks, please read the originial post: here

Share the post

All Our Assertion Problems

×

Subscribe to Java Code Geeks

Get updates delivered right to your inbox!

Thank you for your subscription

×