
JOSHUA S. answered 11/13/19
Professional Software Engineer
Anytime you ask "Is this C thing as easy as this Java thing" The answer is almost always going to be no, just because C is a more complex language with much more control. But I think you might just be asking if there is a framework with an API you can just call.
The answer is that there are actually a bunch! One pretty well known one is call AceUnit (Advanced C and Embedded Unit). Most unit testing frameworks pretty much the same in spirit they just work a little differently or their APIs might impose different syntaxes. AceUnit just provides an API for unit testing, but you'll have to learn it just as you'd have to learn JUnit.
Do a google search for C Unit Testing Framework and you'll find a bunch of good stack overflow posts about them!