Skip to content

Commit

Permalink
Keep fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cromoteca committed Aug 6, 2024
1 parent 0fc673c commit d7e3b47
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ private String getEndpointName(ClassInfoModel endpointCls) {
var endpointAnnotations = getStorage().getParserConfig()
.getEndpointAnnotations();
var endpointAnnotation = endpointCls.getAnnotations().stream()
.filter(annotation -> endpointAnnotations
.contains(((Annotation) annotation.get()).getClass()))
.filter(annotation -> endpointAnnotations.contains(
((Annotation) annotation.get()).annotationType()))
.findFirst();
return endpointAnnotation.flatMap(this::getEndpointAnnotationValue)
.filter(name -> !name.isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public void should_UseCustomEndpointNames_WhenGivenInAnnotation()
.endpointAnnotations(List.of(Endpoint.class))
.endpointExposedAnnotations(List.of(EndpointExposed.class))
.addPlugin(new BackbonePlugin())
.execute(List.of(CustomNameEndpoint.class,
CustomExplicitValueEndpoint.class));
.execute(List.of(CustomExplicitValueEndpoint.class,
CustomNameEndpoint.class));

helper.executeParserWithConfig(openAPI);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.vaadin.hilla.parser.plugins.transfertypes.jsonnode;

import com.vaadin.hilla.EndpointExposed;
import com.vaadin.hilla.parser.core.Parser;
import com.vaadin.hilla.parser.plugins.backbone.BackbonePlugin;
import com.vaadin.hilla.parser.plugins.transfertypes.TransferTypesPlugin;
Expand All @@ -20,6 +21,7 @@ public void should_ReplaceJsonNodeClassWithObject()
var openAPI = new Parser().classLoader(getClass().getClassLoader())
.classPath(Set.of(helper.getTargetDir().toString()))
.endpointAnnotations(List.of(Endpoint.class))
.endpointExposedAnnotations(List.of(EndpointExposed.class))
.addPlugin(new BackbonePlugin())
.addPlugin(new TransferTypesPlugin())
.execute(List.of(JsonNodeEndpoint.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void should_ReplacePushTypes()
.endpointExposedAnnotations(List.of(EndpointExposed.class))
.addPlugin(new BackbonePlugin())
.addPlugin(new TransferTypesPlugin())
.execute(List.of(PushTypeEndpoint.class));
.execute(List.of(OtherEndpoint.class, PushTypeEndpoint.class));

helper.executeParserWithConfig(openAPI);
}
Expand Down

0 comments on commit d7e3b47

Please sign in to comment.