Migrate to JUnit5

This commit is contained in:
Artur Mogozov
2017-12-31 16:29:48 +09:00
parent a20e54d0a7
commit 6694d742a3
408 changed files with 2656 additions and 2165 deletions

View File

@ -24,9 +24,11 @@
package com.iluwatar.retry;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
/**
* Unit tests for {@link FindCustomer}.
@ -50,9 +52,11 @@ public class FindCustomerTest {
*
* @throws Exception the expected exception
*/
@Test(expected = BusinessException.class)
@Test
public void oneException() throws Exception {
new FindCustomer("123", new BusinessException("test")).perform();
assertThrows(BusinessException.class, () -> {
new FindCustomer("123", new BusinessException("test")).perform();
});
}
/**

View File

@ -24,10 +24,11 @@
package com.iluwatar.retry;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.is;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* Unit tests for {@link Retry}.