* BAEL-1216: improve tests * BAEL-1448: Update Spring 5 articles to use the release version * Setting up the Maven Wrapper on a maven project * Add Maven Wrapper on spring-boot module * simple add * BAEL-976: Update spring version * BAEL-1273: Display RSS feed with spring mvc (AbstractRssFeedView) * Move RSS feed with Spring MVC from spring-boot to spring-mvc-simple * BAEL-1285: Update Jackson articles * BAEL-1273: implement both MVC and Rest approach to serve RSS content * RSS(XML & Json) with a custom model * BAEL-1273: remove a resource * BAEL-1519: Guide to scribejava * BAEL-1273: improve xml representation * Fix pom
34 lines
1009 B
Java
34 lines
1009 B
Java
package com.baeldung;
|
|
|
|
import com.github.jsonldjava.core.JsonLdError;
|
|
import com.github.jsonldjava.core.JsonLdOptions;
|
|
import com.github.jsonldjava.core.JsonLdProcessor;
|
|
import com.github.jsonldjava.utils.JsonUtils;
|
|
import org.junit.Test;
|
|
import org.junit.runner.RunWith;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import static org.junit.Assert.assertNotEquals;
|
|
|
|
@RunWith(SpringJUnit4ClassRunner.class)
|
|
@SpringBootTest
|
|
public class JsonLdSerializatorTest {
|
|
|
|
@Test
|
|
public void whenInserting_andCount_thenWeDontGetZero() throws JsonLdError {
|
|
String inputStream = "{name:}";
|
|
Object jsonObject = JsonUtils.fromInputStream(inputStream);
|
|
|
|
Map context = new HashMap();
|
|
JsonLdOptions options = new JsonLdOptions();
|
|
Object compact = JsonLdProcessor.compact(jsonObject, context, options);
|
|
|
|
assertNotEquals(0, 0);
|
|
}
|
|
|
|
}
|