Update to JUnit5 across all modules (#1668)
* Updated saga to JUnit 5 * Update fix for CI job in trampoline module * Updated update-method module to JUnit 5 * Upgraded to latest JUnit Jupiter JUnit 4 is not needed when using JUnit-Vintage * Reverted change to access modifier on Trampoline * Cleanup to resolve code smells * Formatting * Formatting * Migrating to JUnit5 and updating some Mockito patterns * Migrating to JUnit5 * Migrating to JUnit5 * Migrating to JUnit 5 * Formatting cleanup * Added missing scope for junit * Fixed tests that were not running previously. Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
This commit is contained in:
@ -23,23 +23,24 @@
|
||||
|
||||
package com.iluwatar.arrangeactassert;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* ({@link CashAAATest}) is an anti-example of AAA pattern. This test is functionally correct, but
|
||||
* with the addition of new feature, it needs refactoring. There are an awful lot of steps in that
|
||||
* with the addition of a new feature, it needs refactoring. There are an awful lot of steps in that
|
||||
* test method, but it verifies the class' important behavior in just eleven lines. It violates the
|
||||
* single responsibility principle. If this test method failed after a small code change, it might
|
||||
* take some digging to discover why.
|
||||
*/
|
||||
public class CashAntiAAATest {
|
||||
|
||||
class CashAntiAAATest {
|
||||
|
||||
@Test
|
||||
public void testCash() {
|
||||
void testCash() {
|
||||
//initialize
|
||||
var cash = new Cash(3);
|
||||
//test plus
|
||||
|
Reference in New Issue
Block a user