This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-commit lost test after local git inconsistency
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/test/java/de/dm/microservices/business/DefaultNodeContentFactoryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package de.dm.microservices.business; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.databind.node.ObjectNode; | ||
import de.dm.microservices.business.DefaultNodeContentFactory; | ||
import org.junit.Test; | ||
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
|
||
public class DefaultNodeContentFactoryTest { | ||
|
||
private static final String SERVICE_NAME = "halo i bims der servis"; | ||
private ObjectMapper mapper = new ObjectMapper(); | ||
|
||
private DefaultNodeContentFactory factory = new DefaultNodeContentFactory(mapper); | ||
|
||
@Test | ||
public void create() { | ||
ObjectNode result = factory.create(SERVICE_NAME); | ||
|
||
assertThat(result.get("id").textValue(), is(SERVICE_NAME)); | ||
assertThat(result.get("label").textValue(), is(SERVICE_NAME)); | ||
} | ||
} |