JUnit @Test Annotation Examples
Overview In this post, we will see some JUnit @Test Annotation Examples. We can mark the test method in JUnit with @Test annotation. The example test method is shown below: @Test public void addTest() { calculator.enter(5); calculator.add(10); assertEquals(calculator.getScreenResult(), 15); } expected Additionally, the @Test annotation supports two optional parameters. The first is, expected, […]