Skip to content

Commit 6bf2bf1

Browse files
committed
Fixes after rebase
1 parent 0bd673e commit 6bf2bf1

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void testCompileNot() {
201201

202202
@Test
203203
void testCompileEndpointRule() {
204-
EndpointRule rule = EndpointRule.builder()
204+
Rule rule = EndpointRule.builder()
205205
.endpoint(Endpoint.builder()
206206
.url(Literal.stringLiteral(Template.fromString("https://example.com")))
207207
.build());
@@ -221,7 +221,7 @@ void testCompileEndpointWithHeaders() {
221221
Map<String, List<Expression>> headers = new HashMap<>();
222222
headers.put("X-Custom", List.of(Literal.stringLiteral(Template.fromString("value"))));
223223

224-
EndpointRule rule = EndpointRule.builder()
224+
Rule rule = EndpointRule.builder()
225225
.endpoint(Endpoint.builder()
226226
.url(Literal.stringLiteral(Template.fromString("https://example.com")))
227227
.headers(headers)
@@ -243,7 +243,7 @@ void testCompileEndpointWithProperties() {
243243
properties.put(Identifier.of("authSchemes"),
244244
Literal.tupleLiteral(List.of(Literal.stringLiteral(Template.fromString("sigv4")))));
245245

246-
EndpointRule rule = EndpointRule.builder()
246+
Rule rule = EndpointRule.builder()
247247
.endpoint(Endpoint.builder()
248248
.url(Literal.stringLiteral(Template.fromString("https://example.com")))
249249
.properties(properties)
@@ -260,7 +260,7 @@ void testCompileEndpointWithProperties() {
260260

261261
@Test
262262
void testCompileErrorRule() {
263-
ErrorRule rule = ErrorRule.builder().error(Literal.stringLiteral(Template.fromString("Invalid input")));
263+
Rule rule = ErrorRule.builder().error(Literal.stringLiteral(Template.fromString("Invalid input")));
264264

265265
List<Rule> results = List.of(NoMatchRule.INSTANCE, rule);
266266
EndpointBddTrait bdd = createBddWithResults(results);

client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolverTest.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import software.amazon.smithy.rulesengine.language.syntax.rule.Condition;
4343
import software.amazon.smithy.rulesengine.language.syntax.rule.EndpointRule;
4444
import software.amazon.smithy.rulesengine.language.syntax.rule.ErrorRule;
45+
import software.amazon.smithy.rulesengine.language.syntax.rule.Rule;
4546
import software.amazon.smithy.rulesengine.language.syntax.rule.TreeRule;
4647

4748
public class DecisionTreeEndpointResolverTest {
@@ -87,7 +88,7 @@ void testParameterWithDefault() throws Exception {
8788
.defaultValue(Value.stringValue("us-east-1"))
8889
.build();
8990

90-
EndpointRule endpointRule = EndpointRule.builder()
91+
Rule endpointRule = EndpointRule.builder()
9192
.endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("region"))).build());
9293

9394
EndpointRuleSet ruleSet = EndpointRuleSet.builder()
@@ -145,7 +146,7 @@ void testBuiltinParameter() throws Exception {
145146
.fn(IsSet.ofExpressions(Expression.getReference(Identifier.of("endpoint"))))
146147
.build();
147148

148-
EndpointRule endpointRule = EndpointRule.builder()
149+
Rule endpointRule = EndpointRule.builder()
149150
.conditions(List.of(isSetCondition))
150151
.endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("endpoint"))).build());
151152

@@ -174,7 +175,7 @@ void testBuiltinReturnsNull() throws Exception {
174175
.defaultValue(Value.stringValue("https://default.com"))
175176
.build();
176177

177-
EndpointRule endpointRule = EndpointRule.builder()
178+
Rule endpointRule = EndpointRule.builder()
178179
.endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("endpoint"))).build());
179180

180181
EndpointRuleSet ruleSet = EndpointRuleSet.builder()
@@ -241,10 +242,10 @@ void testMultipleParameterTypes() throws Exception {
241242

242243
@Test
243244
void testErrorRuleEvaluation() {
244-
ErrorRule errorRule = ErrorRule.builder().error(Expression.of("Invalid configuration"));
245+
Rule errorRule = ErrorRule.builder().error(Expression.of("Invalid configuration"));
245246

246247
// Add a fallback endpoint rule that won't be reached
247-
EndpointRule fallbackRule = EndpointRule.builder()
248+
Rule fallbackRule = EndpointRule.builder()
248249
.endpoint(Endpoint.builder().url(Expression.of("https://fallback.com")).build());
249250

250251
// Use TreeRule to test error within a condition
@@ -278,7 +279,7 @@ void testParameterPriority() throws Exception {
278279
.builtIn("AWS::Region")
279280
.build();
280281

281-
EndpointRule endpointRule = EndpointRule.builder()
282+
Rule endpointRule = EndpointRule.builder()
282283
.endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("region"))).build());
283284

284285
EndpointRuleSet ruleSet = EndpointRuleSet.builder()
@@ -307,7 +308,7 @@ void testListParameterConversion() throws Exception {
307308
.type(ParameterType.STRING_ARRAY)
308309
.build();
309310

310-
EndpointRule endpointRule = EndpointRule.builder()
311+
Rule endpointRule = EndpointRule.builder()
311312
.endpoint(Endpoint.builder().url(Expression.of(("https://multi-region.example.com"))).build());
312313

313314
EndpointRuleSet ruleSet = EndpointRuleSet.builder()

0 commit comments

Comments
 (0)