-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
282714f
commit b121f68
Showing
10 changed files
with
304 additions
and
25 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
32 changes: 32 additions & 0 deletions
32
gestalt-core/src/test/java/org/github/gestalt/config/processor/TestResultProcessor3.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,32 @@ | ||
package org.github.gestalt.config.processor; | ||
|
||
import org.github.gestalt.config.entity.ValidationError; | ||
import org.github.gestalt.config.entity.ValidationLevel; | ||
import org.github.gestalt.config.processor.result.ResultProcessor; | ||
import org.github.gestalt.config.reflect.TypeCapture; | ||
import org.github.gestalt.config.tag.Tags; | ||
import org.github.gestalt.config.utils.GResultOf; | ||
|
||
public class TestResultProcessor3 implements ResultProcessor { | ||
|
||
public boolean isOk = true; | ||
|
||
public TestResultProcessor3(boolean isOk) { | ||
this.isOk = isOk; | ||
} | ||
|
||
@Override | ||
public <T> GResultOf<T> processResults(GResultOf<T> results, String path, boolean isOptional, T defaultVal, | ||
TypeCapture<T> klass, Tags tags) { | ||
if (isOk) { | ||
return results; | ||
} else { | ||
return GResultOf.errors(new ValidationError(ValidationLevel.ERROR) { | ||
@Override | ||
public String description() { | ||
return "something broke"; | ||
} | ||
}); | ||
} | ||
} | ||
} |
Oops, something went wrong.