Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Francois Leveque
2016-11-24 16:11:49 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e9ae999cfaa602ae18e1e4d9cde5c143c9de945c
e9ae999c
1 parent
de612c7a
Passage à JUnit Jupiter (nouveauté v5)
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
src/test/java/org/legrog/web/book/BookServiceOldTest.java
src/test/java/org/legrog/web/publisher/ListPublisherActionsViewTest.java
src/test/java/org/legrog/web/publisher/ListPublisherVersionsViewTest.java
src/test/java/org/legrog/web/book/BookServiceOldTest.java
View file @
e9ae999
package
org
.
legrog
.
web
.
book
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.extension.ExtendWith
;
import
org.junit.platform.runner.JUnitPlatform
;
import
org.junit.runner.RunWith
;
import
org.legrog.entities.Book
;
import
org.legrog.test.MockitoExtension
;
import
org.legrog.web.book.BookServiceOld
;
import
org.mockito.Answers
;
import
org.mockito.Mock
;
...
...
@@ -18,15 +22,16 @@ import java.util.List;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
@RunWith
(
MockitoJUnitRunner
.
class
)
public
class
BookServiceOldTest
{
@RunWith
(
JUnitPlatform
.
class
)
@ExtendWith
(
MockitoExtension
.
class
)
public
class
BookServiceOldTest
{
@Mock
(
answer
=
Answers
.
RETURNS_DEEP_STUBS
)
private
EntityManager
entityManager
;
private
BookServiceOld
bookServiceOld
;
@Before
@Before
Each
public
void
setUp
()
{
bookServiceOld
=
new
BookServiceOld
(
entityManager
);
}
...
...
src/test/java/org/legrog/web/publisher/ListPublisherActionsViewTest.java
View file @
e9ae999
package
org
.
legrog
.
web
.
publisher
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.
jupiter.api.
Test
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.DisplayName
;
import
org.junit.jupiter.api.Nested
;
...
...
src/test/java/org/legrog/web/publisher/ListPublisherVersionsViewTest.java
View file @
e9ae999
package
org
.
legrog
.
web
.
publisher
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.extension.ExtendWith
;
import
org.junit.platform.runner.JUnitPlatform
;
import
org.junit.runner.RunWith
;
import
org.junit.jupiter.api.DisplayName
;
import
org.legrog.entities.Publisher
;
import
org.legrog.entities.PublisherAction
;
import
org.legrog.entities.PublisherVersion
;
import
org.legrog.test.MockitoExtension
;
import
org.mockito.Answers
;
import
org.mockito.Mock
;
import
org.mockito.Mockito
;
...
...
@@ -23,7 +26,8 @@ import static org.mockito.Mockito.*;
/**
* Classe testant ListPublisherVersionsView.
*/
@RunWith
(
MockitoJUnitRunner
.
class
)
@RunWith
(
JUnitPlatform
.
class
)
@ExtendWith
(
MockitoExtension
.
class
)
@DisplayName
(
"Listes de versions d'éditeurs"
)
public
class
ListPublisherVersionsViewTest
{
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
...
...
@@ -40,7 +44,7 @@ public class ListPublisherVersionsViewTest {
@Mock
(
answer
=
Answers
.
RETURNS_DEEP_STUBS
)
private
PublisherService
publisherService
;
@Before
@Before
Each
public
void
setUp
()
{
// Données
...
...
Please
register
or
login
to post a comment