-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-184 Simplify Visibility and fix issues with public declarations in…
…side package private classes & release 1.14.6
- Loading branch information
Showing
13 changed files
with
78 additions
and
54 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
41 changes: 41 additions & 0 deletions
41
cdn-tests/src/test/kotlin/net/dzikoysk/cdn/feature/ExcludeJavaTest.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,41 @@ | ||
package net.dzikoysk.cdn.feature; | ||
|
||
import net.dzikoysk.cdn.Cdn; | ||
import net.dzikoysk.cdn.CdnException; | ||
import net.dzikoysk.cdn.CdnFactory; | ||
import net.dzikoysk.cdn.entity.Exclude; | ||
import net.dzikoysk.cdn.reflect.Visibility; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import panda.std.Result; | ||
import static panda.std.ResultAssertions.assertOk; | ||
|
||
class ExcludeJavaTest { | ||
|
||
static class ConfigurationWithMultiDescription { | ||
|
||
@Exclude | ||
private final static String STATIC_VALUE = "static"; | ||
|
||
public String value = "test"; | ||
|
||
} | ||
|
||
@Test | ||
@DisplayName("should render value with package-private visibility and exclude static field") | ||
void test() { | ||
Cdn standardJava = CdnFactory.createStandard() | ||
.getSettings() | ||
.withMemberResolver(Visibility.PACKAGE_PRIVATE) | ||
.build(); | ||
Result<String, CdnException> renderResult = standardJava.render(new ConfigurationWithMultiDescription()); | ||
String render = ResultAssertions.assertOk(renderResult); | ||
|
||
Assertions.assertEquals( | ||
"value: test", | ||
render | ||
); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |