-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Moved tests and made basic test for option ref
- Loading branch information
1 parent
5f48b1e
commit 850ee5f
Showing
41 changed files
with
133 additions
and
295 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
20 changes: 20 additions & 0 deletions
20
...nfigupdater/remake/path/pathpart/filters/validators/type/FilterValidatorDeserializer.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,20 @@ | ||
package fr.paulbrancieq.modpackconfigupdater.remake.path.pathpart.filters.validators.type; | ||
|
||
import com.google.gson.JsonDeserializationContext; | ||
import com.google.gson.JsonDeserializer; | ||
import com.google.gson.JsonElement; | ||
import com.google.gson.JsonParseException; | ||
|
||
import java.lang.reflect.Type; | ||
|
||
public class FilterValidatorDeserializer implements JsonDeserializer<FilterValidatorType> { | ||
@Override | ||
public FilterValidatorType deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) | ||
throws JsonParseException { | ||
try { | ||
return FilterValidatorType.fromString(json.getAsString()); | ||
} catch (Exception e) { | ||
throw new JsonParseException("Invalid FilterValidatorType: " + json.getAsString()); | ||
} | ||
} | ||
} |
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
10 changes: 5 additions & 5 deletions
10
...letest/ComplexSubTypeMcuJsonFileTest.java → ...letest/ComplexSubTypeMcuJsonFileTest.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
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
2 changes: 1 addition & 1 deletion
2
...ujsonfiletest/basictestfiles/McuFile.java → ...ujsonfiletest/basictestfiles/McuFile.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
2 changes: 1 addition & 1 deletion
2
...nfiletest/basictestfiles/McuFileData.java → ...nfiletest/basictestfiles/McuFileData.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...mplexsubtypetestfiles/ComplexSubType.java → ...mplexsubtypetestfiles/ComplexSubType.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
2 changes: 1 addition & 1 deletion
2
...testfiles/ComplexSubTypeDeserializer.java → ...testfiles/ComplexSubTypeDeserializer.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
2 changes: 1 addition & 1 deletion
2
...sonfiletest/subtypetestfiles/McuFile.java → ...test/complexsubtypetestfiles/McuFile.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
2 changes: 1 addition & 1 deletion
2
.../complexsubtypetestfiles/McuFileData.java → .../complexsubtypetestfiles/McuFileData.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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...test/complexsubtypetestfiles/McuFile.java → ...sonfiletest/subtypetestfiles/McuFile.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
2 changes: 1 addition & 1 deletion
2
...iletest/subtypetestfiles/McuFileData.java → ...iletest/subtypetestfiles/McuFileData.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
2 changes: 1 addition & 1 deletion
2
...sonfiletest/subtypetestfiles/SubType.java → ...sonfiletest/subtypetestfiles/SubType.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
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions
4
...va/fr/paulbrancieq/modpackconfigupdater/newtests/optionpathtest/FilterOptionPathTest.java
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
src/test/java/fr/paulbrancieq/modpackconfigupdater/oldtest/OptionContextTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.