generated from NASA-PDS/template-repo-java
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #512 from NASA-PDS/classes-endpoints
Add newly refactored `/classes/{class}` endpoint
- Loading branch information
Showing
4 changed files
with
110 additions
and
7 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
16 changes: 16 additions & 0 deletions
16
service/src/test/java/gov/nasa/pds/api/registry/model/PdsProductClassesTest.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,16 @@ | ||
package gov.nasa.pds.api.registry.model; | ||
|
||
import gov.nasa.pds.api.registry.model.identifiers.PdsProductClasses; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class PdsProductClassesTest { | ||
@Test | ||
public void testSwaggerConversions() { | ||
for (PdsProductClasses canonicalClass : PdsProductClasses.values()) { | ||
String swaggerName = canonicalClass.getSwaggerName(); | ||
PdsProductClasses parsedClass = PdsProductClasses.fromSwaggerName(swaggerName); | ||
Assert.assertEquals(canonicalClass, parsedClass); | ||
} | ||
} | ||
} |