Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Ignore JSON4J deprecation in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
  • Loading branch information
berezovskyi committed Jul 15, 2019
1 parent ad2286c commit 1d20207
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
Expand Up @@ -12,7 +12,10 @@

package org.eclipse.lyo.oslc4j.core.exception;

public class LyoModelException extends Exception {
/**
* An unchecked exception to indicate a problem with (un)marshalling an RDF graph model.
*/
public class LyoModelException extends RuntimeException {

public LyoModelException() {
}
Expand Down
Expand Up @@ -41,10 +41,11 @@

/**
* Tests Json working with different combinations of OslcName annotation.
*
*
* @author Fabio Negrello
*
*
*/
@SuppressWarnings("deprecation")
public class JsonOslcNameTest {

private final String NAME_LOCAL_PART = "name";
Expand All @@ -55,7 +56,7 @@ public class JsonOslcNameTest {
/**
* Checks that OslcName annotation with empty string does not add RDF type
* to the resource.
*
*
* @throws Exception
*/
@Test
Expand All @@ -80,7 +81,7 @@ private JSONObject getJSONObject(Object resource, final OslcRdfJsonProvider oslc
/**
* Checks that OslcName annotation with empty string does not add default
* RDF type to the resource but adds the ones specified by addTypes method.
*
*
* @throws Exception
*/
@Test
Expand All @@ -97,7 +98,7 @@ public void testJenaOslcNameEmptyStringAndOtherTypes() throws Exception {

/**
* Checks that OslcName annotation adds RDF type to the resource.
*
*
* @throws Exception
*/
@Test
Expand All @@ -113,7 +114,7 @@ public void testJenaRegularOslcName() throws Exception {
/**
* Checks that the absence of OslcName annotation adds default RDF type to
* the resource.
*
*
* @throws Exception
*/
@Test
Expand Down Expand Up @@ -143,7 +144,7 @@ private void verifyRDFTypes(String[] expectedRDFTypes, JSONArray rdfTypes) throw

/**
* Creates a new instance adding some test values.
*
*
* @param resource
* class.
* @return new instance
Expand Down
Expand Up @@ -25,6 +25,7 @@
import org.eclipse.lyo.oslc4j.provider.json4j.test.resources.TestResource;
import org.junit.Test;

@SuppressWarnings("deprecation")
public class TestInvalidTypesJson
{
@Test(expected = WebApplicationException.class)
Expand Down

0 comments on commit 1d20207

Please sign in to comment.