(Optional) Lab 4.1: Using Junit
(Optional) Lab 4.1: Using Junit
1: USING
JUNIT In this lab you will set up and run JUnit tests
S
Overview: In this (optional) lab, we will work with a simple
JUnit test case, including doing the following:
– Set up an IDE project to use JUnit
– Test a simple Calculator class using some basic
assertions
– testIsEvenPositive()
• Use assertTrue(), passing in a should-be-true condition – for example:
assertTrue(calc.isEven(10));
S
Overview: In this lab, we will work with Spring Testing
– We'll review the POM for it (Spring Boot-based)
– We'll integrate our test class with a Spring context