-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- @ElideTypeConverter annotation removed from a bunch of default serdes - updated serdes added to the ElideSettingsBuilder - registering of the 'isoDate' object mapper module has been removed from a JsonApiMapper constructor in favor of registering it in a common way with all the others serdes during Elide instantiating - serde scalars registering reworked so they are not depend on having @ElideTypeConverter annotation Co-authored-by: Pavlo Kolesnykov <[email protected]>
- Loading branch information
Showing
10 changed files
with
74 additions
and
119 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
50 changes: 50 additions & 0 deletions
50
elide-core/src/test/java/com/yahoo/elide/ElideSettingsBuilderTest.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,50 @@ | ||
/* | ||
* Copyright 2021, Yahoo Inc. | ||
* Licensed under the Apache License, Version 2.0 | ||
* See LICENSE file in project root for terms. | ||
*/ | ||
|
||
package com.yahoo.elide; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import com.yahoo.elide.core.datastore.DataStore; | ||
import com.yahoo.elide.core.utils.coerce.converters.InstantSerde; | ||
import com.yahoo.elide.core.utils.coerce.converters.OffsetDateTimeSerde; | ||
import com.yahoo.elide.core.utils.coerce.converters.Serde; | ||
import com.yahoo.elide.core.utils.coerce.converters.TimeZoneSerde; | ||
import com.yahoo.elide.core.utils.coerce.converters.URLSerde; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.mockito.Mock; | ||
|
||
import java.net.URL; | ||
import java.time.Instant; | ||
import java.time.OffsetDateTime; | ||
import java.util.Map; | ||
import java.util.TimeZone; | ||
|
||
|
||
class ElideSettingsBuilderTest { | ||
|
||
private ElideSettingsBuilder testInstance; | ||
|
||
@Mock | ||
private DataStore dataStore; | ||
|
||
@BeforeEach | ||
public void setUp() { | ||
testInstance = new ElideSettingsBuilder(dataStore); | ||
} | ||
|
||
@Test | ||
@SuppressWarnings("rawtypes") | ||
public void shouldBuildSettingsWithDefaultSerdes() { | ||
Map<Class, Serde> serdes = testInstance.build().getSerdes(); | ||
|
||
assertEquals(InstantSerde.class, serdes.get(Instant.class).getClass()); | ||
assertEquals(OffsetDateTimeSerde.class, serdes.get(OffsetDateTime.class).getClass()); | ||
assertEquals(TimeZoneSerde.class, serdes.get(TimeZone.class).getClass()); | ||
assertEquals(URLSerde.class, serdes.get(URL.class).getClass()); | ||
} | ||
} |
78 changes: 0 additions & 78 deletions
78
elide-core/src/test/java/com/yahoo/elide/jsonapi/JsonApiMapperTest.java
This file was deleted.
Oops, something went wrong.
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