Local tests run directly on workstation using JVM. Unit tests verify small code sections by executing and checking results. Tests must be accessible and use public APIs
unittest is inspired by JUnit and supports test automation and setup/shutdown code sharing. Test fixtures represent preparation and cleanup actions needed for tests. Test cases are individual units of testing that check specific responses. Test suites aggregate tests into collections for execution. Test runners orchestrate test execution and provide results
Mock functions allow testing code links by erasing implementation details. All mocks have .mock property tracking call history and return values. Mock functions can inject test values during testing
Unit testing checks smallest testable parts of an application independently. It helps developers build better applications with fewer bugs
Static methods are defined at class level and can be accessed without instances. Static methods are resolved at compile-time based on class definition. Static methods cannot reference instance members or call instance methods
assertThrows method checks if an exception is thrown. AssertThrows returns the exception and enables message verification. AssertDoesNotThrow ensures no exceptions are thrown. Custom exception type checking requires functional interface implementation