Comparing arrays in JUnit assertions, concise built-in way?

Is there a concise, built-in way to do equals assertions on two like-typed arrays in JUnit? By default (at least in JUnit 4) it seems to do an instance compare on the array object itself. EG, doesn’t work: int[] expectedResult = new int[] { 116800, 116800 }; int[] result = new GraphixMask().sortedAreas(rectangles); assertEquals(expectedResult, result); Of … Read more

When should I use Debug.Assert()?

I’ve been a professional software engineer for about a year now, having graduated with a CS degree. I’ve known about assertions for a while in C++ and C, but had no idea they existed in C# and .NET at all until recently. Our production code contains no asserts whatsoever and my question is this… Should … Read more