This repository has been archived by the owner on May 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
amckenzie
committed
Dec 14, 2017
1 parent
0209106
commit bfd56fe
Showing
27 changed files
with
191 additions
and
231 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
catalog-core/src/main/java/uk/gov/justice/schema/catalog/CatalogContext.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,33 @@ | ||
package uk.gov.justice.schema.catalog; | ||
|
||
/** | ||
* Constants used in the Catalog generation | ||
*/ | ||
public class CatalogContext { | ||
|
||
private static final String CATALOG_LOCATION = "META-INF/"; | ||
private static final String CATALOG_FILENAME = "schema_catalog.json"; | ||
|
||
public static final String AN_EMPTY_STRING = ""; | ||
|
||
/** | ||
* @return The file name of the json catalog. | ||
*/ | ||
public String getCatalogFilename() { | ||
return CATALOG_FILENAME; | ||
} | ||
|
||
/** | ||
* @return The location of the json catalog. | ||
*/ | ||
public String getCatalogLocation() { | ||
return CATALOG_LOCATION; | ||
} | ||
|
||
/** | ||
* @return The full path of the json catalog. | ||
*/ | ||
public String getCatalogFullPath() { | ||
return CATALOG_LOCATION + CATALOG_FILENAME; | ||
} | ||
} |
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
31 changes: 31 additions & 0 deletions
31
catalog-core/src/test/java/uk/gov/justice/schema/catalog/CatalogContextTest.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,31 @@ | ||
package uk.gov.justice.schema.catalog; | ||
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.junit.Assert.assertThat; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.mockito.InjectMocks; | ||
import org.mockito.runners.MockitoJUnitRunner; | ||
|
||
@RunWith(MockitoJUnitRunner.class) | ||
public class CatalogContextTest { | ||
|
||
@InjectMocks | ||
private CatalogContext catalogContext; | ||
|
||
@Test | ||
public void shouldGetCatalogFilename() throws Exception { | ||
assertThat(catalogContext.getCatalogFilename(), is("schema_catalog.json")); | ||
} | ||
|
||
@Test | ||
public void shouldGetTheCatalogLocation() throws Exception { | ||
assertThat(catalogContext.getCatalogLocation(), is("META-INF/")); | ||
} | ||
|
||
@Test | ||
public void shouldGetTheCatalogFullPath() throws Exception { | ||
assertThat(catalogContext.getCatalogFullPath(), is("META-INF/schema_catalog.json")); | ||
} | ||
} |
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
File renamed without changes.
Oops, something went wrong.