Skip to content

Commit 60ca30b

Browse files
committed
Update expected test files for Config generator
1 parent ec70ed7 commit 60ca30b

15 files changed

+50
-35
lines changed

config-generator/src/test/resources/expected/CollectingKeys.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.stream.Collectors;
2828
import javax.annotation.processing.Generated;
2929
import org.jetbrains.annotations.NotNull;
30+
import org.neo4j.gds.core.CypherMapAccess;
3031
import org.neo4j.gds.core.CypherMapWrapper;
3132

3233
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -37,7 +38,7 @@ public final class CollectingKeysConfig implements CollectingKeys {
3738

3839
private double baz;
3940

40-
public CollectingKeysConfig(int foo, @NotNull CypherMapWrapper config) {
41+
public CollectingKeysConfig(int foo, @NotNull CypherMapAccess config) {
4142
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
4243
try {
4344
this.foo = foo;

config-generator/src/test/resources/expected/Conversions.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.stream.Collectors;
2626
import javax.annotation.processing.Generated;
2727
import org.jetbrains.annotations.NotNull;
28+
import org.neo4j.gds.core.CypherMapAccess;
2829
import org.neo4j.gds.core.CypherMapWrapper;
2930

3031
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -37,7 +38,7 @@ public final class ConversionsConfig implements Conversions.MyConversion {
3738

3839
private String referenceTypeAsResult;
3940

40-
public ConversionsConfig(@NotNull CypherMapWrapper config) {
41+
public ConversionsConfig(@NotNull CypherMapAccess config) {
4142
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
4243
try {
4344
this.directMethod = Conversions.MyConversion.toInt(config.requireString("directMethod"));
@@ -55,7 +56,7 @@ public ConversionsConfig(@NotNull CypherMapWrapper config) {
5556
errors.add(e);
5657
}
5758
try {
58-
this.referenceTypeAsResult = CypherMapWrapper.failOnNull(
59+
this.referenceTypeAsResult = CypherMapAccess.failOnNull(
5960
"referenceTypeAsResult",
6061
Conversions.MyConversion.add42(config.requireString("referenceTypeAsResult"))
6162
);

config-generator/src/test/resources/expected/ConvertingParameters.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.stream.Collectors;
2626
import javax.annotation.processing.Generated;
2727
import org.jetbrains.annotations.NotNull;
28+
import org.neo4j.gds.core.CypherMapAccess;
2829
import org.neo4j.gds.core.CypherMapWrapper;
2930

3031
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -34,7 +35,7 @@ public final class ConvertingParametersConfig implements ConvertingParameters {
3435
public ConvertingParametersConfig(@NotNull String parametersAreSubjectToConversion) {
3536
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
3637
try {
37-
this.parametersAreSubjectToConversion = ConvertingParameters.toInt(CypherMapWrapper.failOnNull(
38+
this.parametersAreSubjectToConversion = ConvertingParameters.toInt(CypherMapAccess.failOnNull(
3839
"parametersAreSubjectToConversion",
3940
parametersAreSubjectToConversion
4041
));

config-generator/src/test/resources/expected/DefaultValues.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.stream.Collectors;
2626
import javax.annotation.processing.Generated;
2727
import org.jetbrains.annotations.NotNull;
28+
import org.neo4j.gds.core.CypherMapAccess;
2829
import org.neo4j.gds.core.CypherMapWrapper;
2930

3031
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -33,15 +34,15 @@ public final class DefaultValuesConfig implements DefaultValues {
3334

3435
private String defaultString;
3536

36-
public DefaultValuesConfig(@NotNull CypherMapWrapper config) {
37+
public DefaultValuesConfig(@NotNull CypherMapAccess config) {
3738
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
3839
try {
3940
this.defaultInt = config.getInt("defaultInt", DefaultValues.super.defaultInt());
4041
} catch (IllegalArgumentException e) {
4142
errors.add(e);
4243
}
4344
try {
44-
this.defaultString = CypherMapWrapper.failOnNull(
45+
this.defaultString = CypherMapAccess.failOnNull(
4546
"defaultString",
4647
config.getString("defaultString", DefaultValues.super.defaultString())
4748
);

config-generator/src/test/resources/expected/FieldTypes.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.stream.Collectors;
2828
import javax.annotation.processing.Generated;
2929
import org.jetbrains.annotations.NotNull;
30+
import org.neo4j.gds.core.CypherMapAccess;
3031
import org.neo4j.gds.core.CypherMapWrapper;
3132

3233
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -55,7 +56,7 @@ public final class FieldTypesConfig implements FieldTypes {
5556

5657
private Optional<String> anOptional;
5758

58-
public FieldTypesConfig(@NotNull CypherMapWrapper config) {
59+
public FieldTypesConfig(@NotNull CypherMapAccess config) {
5960
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
6061
try {
6162
this.aBoolean = config.requireBool("aBoolean");
@@ -93,27 +94,27 @@ public FieldTypesConfig(@NotNull CypherMapWrapper config) {
9394
errors.add(e);
9495
}
9596
try {
96-
this.aNumber = CypherMapWrapper.failOnNull("aNumber", config.requireNumber("aNumber"));
97+
this.aNumber = CypherMapAccess.failOnNull("aNumber", config.requireNumber("aNumber"));
9798
} catch (IllegalArgumentException e) {
9899
errors.add(e);
99100
}
100101
try {
101-
this.aString = CypherMapWrapper.failOnNull("aString", config.requireString("aString"));
102+
this.aString = CypherMapAccess.failOnNull("aString", config.requireString("aString"));
102103
} catch (IllegalArgumentException e) {
103104
errors.add(e);
104105
}
105106
try {
106-
this.aMap = CypherMapWrapper.failOnNull("aMap", config.requireChecked("aMap", Map.class));
107+
this.aMap = CypherMapAccess.failOnNull("aMap", config.requireChecked("aMap", Map.class));
107108
} catch (IllegalArgumentException e) {
108109
errors.add(e);
109110
}
110111
try {
111-
this.aList = CypherMapWrapper.failOnNull("aList", config.requireChecked("aList", List.class));
112+
this.aList = CypherMapAccess.failOnNull("aList", config.requireChecked("aList", List.class));
112113
} catch (IllegalArgumentException e) {
113114
errors.add(e);
114115
}
115116
try {
116-
this.anOptional = CypherMapWrapper.failOnNull("anOptional", config.getOptional("anOptional", String.class));
117+
this.anOptional = CypherMapAccess.failOnNull("anOptional", config.getOptional("anOptional", String.class));
117118
} catch (IllegalArgumentException e) {
118119
errors.add(e);
119120
}

config-generator/src/test/resources/expected/Ignores.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@
2525
import java.util.stream.Collectors;
2626
import javax.annotation.processing.Generated;
2727
import org.jetbrains.annotations.NotNull;
28+
import org.neo4j.gds.core.CypherMapAccess;
2829
import org.neo4j.gds.core.CypherMapWrapper;
2930

3031
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
3132
public final class MyConfigImpl implements Ignores.MyConfig {
3233
private long notIgnored;
3334

34-
public MyConfig(@NotNull CypherMapWrapper config) {
35+
public MyConfig(@NotNull CypherMapAccess config) {
3536
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
3637
try {
3738
this.notIgnored = config.requireLong("notIgnored");

config-generator/src/test/resources/expected/Inheritance.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import javax.annotation.processing.Generated;
2727

2828
import org.jetbrains.annotations.NotNull;
29+
import org.neo4j.gds.core.CypherMapAccess;
2930
import org.neo4j.gds.core.CypherMapWrapper;
3031

3132
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -42,10 +43,10 @@ public final class MyConfigImpl implements Inheritance.MyConfig {
4243

4344
private short inheritedDefaultValue;
4445

45-
public MyConfigImpl(@NotNull CypherMapWrapper config) {
46+
public MyConfigImpl(@NotNull CypherMapAccess config) {
4647
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
4748
try {
48-
this.baseValue = CypherMapWrapper.failOnNull("baseValue", config.requireString("baseValue"));
49+
this.baseValue = CypherMapAccess.failOnNull("baseValue", config.requireString("baseValue"));
4950
} catch (IllegalArgumentException e) {
5051
errors.add(e);
5152
}

config-generator/src/test/resources/expected/KeyRenames.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.stream.Collectors;
2626
import javax.annotation.processing.Generated;
2727
import org.jetbrains.annotations.NotNull;
28+
import org.neo4j.gds.core.CypherMapAccess;
2829
import org.neo4j.gds.core.CypherMapWrapper;
2930

3031
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -33,7 +34,7 @@ public final class KeyRenamesConfig implements KeyRenames {
3334

3435
private int whitespaceWillBeTrimmed;
3536

36-
public KeyRenamesConfig(@NotNull CypherMapWrapper config) {
37+
public KeyRenamesConfig(@NotNull CypherMapAccess config) {
3738
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
3839
try {
3940
this.lookupUnderAnotherKey = config.requireInt("key could also be an invalid identifier");

config-generator/src/test/resources/expected/NamingConflict.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.stream.Collectors;
2626
import javax.annotation.processing.Generated;
2727
import org.jetbrains.annotations.NotNull;
28+
import org.neo4j.gds.core.CypherMapAccess;
2829
import org.neo4j.gds.core.CypherMapWrapper;
2930

3031
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -35,7 +36,7 @@ public final class NamingConflictConfig implements NamingConflict {
3536

3637
private int config_;
3738

38-
public NamingConflictConfig(int config_, @NotNull CypherMapWrapper config__) {
39+
public NamingConflictConfig(int config_, @NotNull CypherMapAccess config__) {
3940
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
4041
try {
4142
this.config = config__.requireInt("config");

config-generator/src/test/resources/expected/NullableFields.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import javax.annotation.processing.Generated;
2727
import org.jetbrains.annotations.NotNull;
2828
import org.jetbrains.annotations.Nullable;
29+
import org.neo4j.gds.core.CypherMapAccess;
2930
import org.neo4j.gds.core.CypherMapWrapper;
3031

3132
@Generated("org.neo4j.gds.proc.ConfigurationProcessor")
@@ -36,7 +37,7 @@ public final class NullableFieldsConfig implements NullableFields {
3637

3738
private @Nullable String conversionCanReturnNull;
3839

39-
public NullableFieldsConfig(@NotNull CypherMapWrapper config) {
40+
public NullableFieldsConfig(@NotNull CypherMapAccess config) {
4041
ArrayList<IllegalArgumentException> errors = new ArrayList<>();
4142
try {
4243
this.nullableRequiredField = config.requireString("nullableRequiredField");

0 commit comments

Comments
 (0)