-
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.
test: Add test for enum generation with argument builder
- Loading branch information
Showing
4 changed files
with
65 additions
and
0 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
9 changes: 9 additions & 0 deletions
9
...m/pinterest/l10nmessages/L10nPropertiesProcessorTest_IO/validArgumentBuilder/TestApp.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,9 @@ | ||
package com.pinterest.l10nmessages.L10nPropertiesProcessorTest_IO.valid; | ||
|
||
import com.pinterest.l10nmessages.EnumType; | ||
import com.pinterest.l10nmessages.L10nProperties; | ||
|
||
@L10nProperties(baseName = "com.pinterest.l10nmessages.L10nPropertiesProcessorTest_IO.validArgumentBuilder.TestMessages", | ||
enumType = EnumType.WITH_ARGUMENT_BUILDERS) | ||
public class TestApp { | ||
} |
48 changes: 48 additions & 0 deletions
48
...terest/l10nmessages/L10nPropertiesProcessorTest_IO/validArgumentBuilder/TestMessages.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,48 @@ | ||
package com.pinterest.l10nmessages.L10nPropertiesProcessorTest_IO.validArgumentBuilder; | ||
|
||
import com.pinterest.l10nmessages.FormatContext; | ||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
import javax.annotation.Generated; | ||
|
||
@Generated("com.pinterest.l10nmessages.L10nPropertiesProcessor") | ||
public enum TestMessages { | ||
hello_user("hello_user"); | ||
|
||
public static final String BASENAME = "com.pinterest.l10nmessages.L10nPropertiesProcessorTest_IO.validArgumentBuilder.TestMessages"; | ||
public static final String MESSAGE_FORMAT_ADAPTER_PROVIDERS = "AUTO"; | ||
|
||
private String key; | ||
|
||
TestMessages(String key) { | ||
this.key = key; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return key; | ||
} | ||
|
||
public static class FC_hello_user implements FormatContext<TestMessages> { | ||
Map<String, Object> map = new LinkedHashMap<>(); | ||
|
||
@Override | ||
public TestMessages getKey() { | ||
return hello_user; | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getArguments() { | ||
return map; | ||
} | ||
|
||
public FC_hello_user username(Object value) { | ||
map.put("username", value); | ||
return this; | ||
} | ||
} | ||
|
||
public static FC_hello_user hello_user() { | ||
return new FC_hello_user(); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
.../l10nmessages/L10nPropertiesProcessorTest_IO/validArgumentBuilder/TestMessages.properties
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 @@ | ||
hello_user=Hello {username} |