Commit 5595d4f6 authored by Tom Adam's avatar Tom Adam
Browse files

DEICH-6139 - Moved static field to make AutoExpandingJsonWriter happy

parent 230539a0
......@@ -13,8 +13,6 @@ import java.util.Date;
@JsonFilter("visibilityFilter")
public class Editor extends JsonApiRootClass {
public static final String DEFAULT_BIOGRAPHY = "Ansatt i Deichman";
@VisibilityFilter(onlyVisibleWith = {ProfileVisibility.hidden})
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private String username;
......
......@@ -46,7 +46,6 @@ import static com.google.common.collect.Lists.newArrayList;
import static java.util.Collections.emptyList;
import static java.util.stream.Collectors.toList;
import static no.deichman.auth.DeichmanUser.toEditor;
import static no.deichman.euler.api.resource.jsonapi.vos.base.Editor.DEFAULT_BIOGRAPHY;
/**
* Class responsible for translating json <--> sparql/triples
......@@ -57,6 +56,8 @@ import static no.deichman.euler.api.resource.jsonapi.vos.base.Editor.DEFAULT_BIO
@Component
public class VirtuosoJsonAdapter {
public static final String DEFAULT_BIOGRAPHY = "Ansatt i Deichman";
private final SparqlGenerator sparqlGenerator;
private final RdfJsonRepository rdfJsonRepository;
private final ResourceIndexer resourceIndexer;
......
......@@ -15,7 +15,6 @@ import org.mockito.junit.jupiter.MockitoExtension;
import static java.util.Collections.emptyList;
import static java.util.Collections.singletonList;
import static no.deichman.euler.api.resource.jsonapi.vos.base.Editor.DEFAULT_BIOGRAPHY;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
......@@ -137,7 +136,7 @@ class VirtuosoJsonAdapterTest {
@DisplayName("Should set default biography")
void setsDefaultBio() {
assertEquals(
DEFAULT_BIOGRAPHY,
VirtuosoJsonAdapter.DEFAULT_BIOGRAPHY,
createdEditor.getBiography()
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment