From 3be9b1213438da01226b07a020ad277de27b75ef Mon Sep 17 00:00:00 2001 From: Sebastian Daschner Date: Fri, 13 Jul 2018 09:36:26 +0700 Subject: [PATCH] simplified configuration; updated documentation; minor clean-up; --- Changelog.adoc | 17 ++- Documentation.adoc | 9 +- .../jaxrs_analyzer/JAXRSAnalyzer.java | 109 +++++++++++------- .../jaxrs_analyzer/Main.java | 76 ++++++------ .../analysis/ProjectAnalyzer.java | 24 ++-- .../MarkdownBackend.java | 2 +- .../utils/RestrictedStringHashSet.java | 43 ------- ...an_daschner.jaxrs_analyzer.backend.Backend | 2 +- .../analysis/ProjectAnalyzerTest.java | 8 +- .../backend/markdown/MarkdownBackendTest.java | 1 - 10 files changed, 136 insertions(+), 155 deletions(-) rename src/main/java/com/sebastian_daschner/jaxrs_analyzer/backend/{mardown => markdown}/MarkdownBackend.java (98%) delete mode 100644 src/main/java/com/sebastian_daschner/jaxrs_analyzer/utils/RestrictedStringHashSet.java diff --git a/Changelog.adoc b/Changelog.adoc index 785ce86..ed764b7 100644 --- a/Changelog.adoc +++ b/Changelog.adoc @@ -2,10 +2,19 @@ Sebastian Daschner // new versions are placed on the top -== v0.17-SNAPSHOT -- Generating description also in Plaintext, Asciidoc and Markdown -- Added Markdown support -- Added possibility to ignore JAX-RS boundary classes + +== v0.17 SNAPSHOT +- Markdown support +- Added resource description in remaining backends +- Support to ignore JAX-RS boundary classes + +== v0.16 +- Added AsciiDoc prettification +- Fixed error on empty application path +- Minor fixes + +== v0.15 +- Fixed JavaDoc erased types == v0.14 - Fixed test related execution phase diff --git a/Documentation.adoc b/Documentation.adoc index b11104a..ad43515 100644 --- a/Documentation.adoc +++ b/Documentation.adoc @@ -13,7 +13,7 @@ Just add the latest release version of the JAX-RS Analyzer to your Maven pom.xml com.sebastian-daschner jaxrs-analyzer-maven-plugin - 0.14 + 0.16 @@ -57,15 +57,14 @@ Following available backend specific options (only have effect if the correspond * `--swaggerSchemes [,schemes]` The Swagger schemes: `http` (default), `https`, `ws`, `wss` * `--renderSwaggerTags` Enables rendering of Swagger tags (default tag will be used per default) * `--swaggerTagsPathOffset ` The number at which path position the Swagger tags will be extracted (0 will be used per default) -* `--ignoredBoundaryClasses ` Boundary classes which should be ignored by analyze (empty per default) +* `--ignoredRootResources ` JAX-RS root resource classes which should be ignored by analyze (empty per default). Note that these ignores only cause the classes to be ignored as root resources; they might still be taken into account as JAX-RS sub-resources. == Backends The Analyzer supports Plaintext, AsciiDoc, Markdown and Swagger as output format. The latter three can be processed further. -Markdown is a human-readable, lightweight markup langugae. - -AsciiDoc is like Markdown. But it can be easily converted to PDF, HTML (and many more) using tools like https://github.com/asciidoctor/asciidoctor[Asciidoctor]. +AsciiDoc and Markdown are human-readable, lightweight markup languages. +They can easily converted to PDF, HTML, and many more. The Swagger JSON file can be used with Swagger UI or the http://editor.swagger.io[Swagger Editor]. diff --git a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/JAXRSAnalyzer.java b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/JAXRSAnalyzer.java index 8da29ec..69ac827 100644 --- a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/JAXRSAnalyzer.java +++ b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/JAXRSAnalyzer.java @@ -22,68 +22,43 @@ */ public class JAXRSAnalyzer { - private final Set projectClassPaths = new HashSet<>(); - private final Set projectSourcePaths = new HashSet<>(); - private final Set classPaths = new HashSet<>(); - private final String projectName; - private final String projectVersion; - private final Path outputLocation; - private final Backend backend; - private Set ignoredBoundaryClasses = new HashSet<>(); - + private final Analysis analysis; /** * Constructs a JAX-RS Analyzer. - * - * @param projectClassPaths The paths of the projects classes to be analyzed (can either be directories or jar-files, at least one is mandatory) - * @param projectSourcePaths The paths of the projects sources to be analyzed (can either be directories or jar-files, optional) - * @param classPaths The additional class paths (can either be directories or jar-files) - * @param projectName The project name - * @param projectVersion The project version - * @param backend The backend to render the output - * @param outputLocation The location of the output file (output will be printed to standard out if {@code null}) */ - public JAXRSAnalyzer(final Set projectClassPaths, final Set projectSourcePaths, final Set classPaths, final String projectName, final String projectVersion, - final Backend backend, final Path outputLocation) { - Objects.requireNonNull(projectClassPaths); - Objects.requireNonNull(projectSourcePaths); - Objects.requireNonNull(classPaths); - Objects.requireNonNull(projectName); - Objects.requireNonNull(projectVersion); - Objects.requireNonNull(backend); - - if (projectClassPaths.isEmpty()) + public JAXRSAnalyzer(Analysis analysis) { + Objects.requireNonNull(analysis); + Objects.requireNonNull(analysis.projectClassPaths); + Objects.requireNonNull(analysis.projectSourcePaths); + Objects.requireNonNull(analysis.classPaths); + Objects.requireNonNull(analysis.projectName); + Objects.requireNonNull(analysis.projectVersion); + Objects.requireNonNull(analysis.backend); + + if (analysis.projectClassPaths.isEmpty()) throw new IllegalArgumentException("At least one project path is mandatory"); - this.projectClassPaths.addAll(projectClassPaths); - this.projectSourcePaths.addAll(projectSourcePaths); - this.classPaths.addAll(classPaths); - this.projectName = projectName; - this.projectVersion = projectVersion; - this.outputLocation = outputLocation; - this.backend = backend; - } - - public void setIgnoredBoundaryClasses( Set ignoredBoundaryClasses ) { - this.ignoredBoundaryClasses = ignoredBoundaryClasses; + this.analysis = analysis; } /** * Analyzes the JAX-RS project at the class path and produces the output as configured. */ public void analyze() { - final Resources resources = new ProjectAnalyzer( classPaths, ignoredBoundaryClasses ).analyze(projectClassPaths, projectSourcePaths); + final Resources resources = new ProjectAnalyzer(analysis.classPaths) + .analyze(analysis.projectClassPaths, analysis.projectSourcePaths, analysis.ignoredResources); if (resources.isEmpty()) { LogProvider.info("Empty JAX-RS analysis result, omitting output"); return; } - final Project project = new Project(projectName, projectVersion, resources); - final byte[] output = backend.render(project); + final Project project = new Project(analysis.projectName, analysis.projectVersion, resources); + final byte[] output = analysis.backend.render(project); - if (outputLocation != null) { - outputToFile(output, outputLocation); + if (analysis.outputLocation != null) { + outputToFile(output, analysis.outputLocation); } else { outputToConsole(output); } @@ -117,4 +92,52 @@ public static Backend constructBackend(final String backendType) { .orElseThrow(() -> new IllegalArgumentException("Unknown backend type " + backendType)); } + public static class Analysis { + + private final Set projectClassPaths = new HashSet<>(); + private final Set projectSourcePaths = new HashSet<>(); + private final Set classPaths = new HashSet<>(); + private final Set ignoredResources = new HashSet<>(); + private String projectName; + private String projectVersion; + private Path outputLocation; + private Backend backend; + + public Set getProjectClassPaths() { + return projectClassPaths; + } + + public void addProjectClassPath(Path classPath) { + projectClassPaths.add(classPath); + } + + public void addProjectSourcePath(Path sourcePath) { + projectSourcePaths.add(sourcePath); + } + + public void addClassPath(Path classPath) { + classPaths.add(classPath); + } + + public void addIgnoredResource(String ignored) { + ignoredResources.add(ignored); + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public void setProjectVersion(String projectVersion) { + this.projectVersion = projectVersion; + } + + public void setOutputLocation(Path outputLocation) { + this.outputLocation = outputLocation; + } + + public void setBackend(Backend backend) { + this.backend = backend; + } + } + } diff --git a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/Main.java b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/Main.java index 0eaf086..ef63f01 100644 --- a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/Main.java +++ b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/Main.java @@ -22,7 +22,9 @@ import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -35,16 +37,12 @@ public class Main { private static final String DEFAULT_NAME = "project"; private static final String DEFAULT_VERSION = "0.1-SNAPSHOT"; + private static final String DEFAULT_BACKEND = "swagger"; + private static final String COMMA_LIST_SEPARATOR = ","; - private static final Set projectClassPaths = new HashSet<>(); - private static final Set projectSourcePaths = new HashSet<>(); - private static final Set classPaths = new HashSet<>(); + private static final JAXRSAnalyzer.Analysis analysis = new JAXRSAnalyzer.Analysis(); private static final Map attributes = new HashMap<>(); - private static String name = DEFAULT_NAME; - private static String version = DEFAULT_VERSION; - private static String backendType = "swagger"; - private static Set ignoredBoundaryClasses = new HashSet<>(); - private static Path outputFileLocation; + private static Backend backend; /** * Inspects JAX-RS projects and outputs the gathered information. @@ -71,7 +69,7 @@ public class Main { *
  • {@code --swaggerSchemes scheme[,schemes]} The Swagger schemes: {@code http} (default), {@code https}, {@code ws}, {@code wss}")
  • *
  • {@code --renderSwaggerTags} Enables rendering of Swagger tags (will not be rendered per default)
  • *
  • {@code --swaggerTagsPathOffset path offset} The number at which path position the Swagger tags should be extracted ({@code 0} per default)
  • - *
  • {@code --ignoredBoundaryClasses class[,classes]} Boundary classes which should be ignored by analyze (empty per default)
  • + *
  • {@code --ignoredRootResources class[,classes]} JAX-RS root resource classes which should be ignored by analyze (empty per default)
  • * * * @param args The arguments @@ -82,6 +80,7 @@ public static void main(final String... args) { } try { + setDefaults(); extractArgs(args); } catch (IllegalArgumentException e) { System.err.println(e.getMessage() + '\n'); @@ -89,13 +88,14 @@ public static void main(final String... args) { } validateArgs(); + configureBackend(); - final Backend backend = JAXRSAnalyzer.constructBackend(backendType); - backend.configure(attributes); + new JAXRSAnalyzer(analysis).analyze(); + } - final JAXRSAnalyzer jaxrsAnalyzer = new JAXRSAnalyzer(projectClassPaths, projectSourcePaths, classPaths, name, version, backend, outputFileLocation); - jaxrsAnalyzer.setIgnoredBoundaryClasses( ignoredBoundaryClasses ); - jaxrsAnalyzer.analyze(); + private static void setDefaults() { + analysis.setProjectName(DEFAULT_NAME); + analysis.setProjectVersion(DEFAULT_VERSION); } private static void extractArgs(String[] args) { @@ -104,28 +104,28 @@ private static void extractArgs(String[] args) { if (args[i].startsWith("-")) { switch (args[i]) { case "-b": - backendType = extractBackend(args[++i]); + analysis.setBackend(extractBackend(args[++i])); break; case "-cp": - extractClassPaths(args[++i]).forEach(classPaths::add); + extractClassPaths(args[++i]).forEach(analysis::addClassPath); break; case "-sp": - extractClassPaths(args[++i]).forEach(projectSourcePaths::add); + extractClassPaths(args[++i]).forEach(analysis::addProjectSourcePath); break; case "-X": LogProvider.injectDebugLogger(System.err::println); break; case "-n": - name = args[++i]; + analysis.setProjectName(args[++i]); break; case "-v": - version = args[++i]; + analysis.setProjectVersion(args[++i]); break; case "-d": attributes.put(SwaggerOptions.DOMAIN, args[++i]); break; case "-o": - outputFileLocation = Paths.get(args[++i]); + analysis.setOutputLocation(Paths.get(args[++i])); break; case "-e": System.setProperty("project.build.sourceEncoding", args[++i]); @@ -142,8 +142,8 @@ private static void extractArgs(String[] args) { case "--noInlinePrettify": attributes.put(StringBackend.INLINE_PRETTIFY, "false"); break; - case "--ignoredBoundaryClasses": - ignoredBoundaryClasses = buildSetOfCommaList( args[++i] ); + case "--ignoredRootResources": + extractList(args[++i]).forEach(analysis::addIgnoredResource); break; case "-a": addAttribute(args[++i]); @@ -157,7 +157,7 @@ private static void extractArgs(String[] args) { System.err.println("Location " + path.toFile() + " doesn't exist\n"); printUsageAndExit(); } - projectClassPaths.add(path); + analysis.addProjectClassPath(path); } } } catch (IndexOutOfBoundsException e) { @@ -177,8 +177,8 @@ static Map addAttribute(String attribute) { return attributes; } - private static String extractBackend(final String name) { - return name.toLowerCase(); + private static Backend extractBackend(final String name) { + return JAXRSAnalyzer.constructBackend(name.toLowerCase()); } private static List extractClassPaths(final String classPaths) { @@ -193,27 +193,31 @@ private static List extractClassPaths(final String classPaths) { return paths; } - private static Set buildSetOfCommaList( String commaList ) { - Set set = new HashSet<>(); - if( commaList==null || commaList.trim().isEmpty() ) - return set; - - set.addAll( Arrays.asList( commaList.split( "," ) ) ); - return set; + private static List extractList(String list) { + return Stream.of(list.split(COMMA_LIST_SEPARATOR)) + .map(String::trim) + .filter(String::isEmpty) + .collect(Collectors.toList()); } private static void validateArgs() { - if (projectClassPaths.isEmpty()) { + if (analysis.getProjectClassPaths().isEmpty()) { System.err.println("Please provide at least one project path\n"); printUsageAndExit(); } } + private static void configureBackend() { + if (backend == null) + backend = JAXRSAnalyzer.constructBackend(DEFAULT_BACKEND); + backend.configure(attributes); + } + private static void printUsageAndExit() { System.err.println("Usage: java -jar jaxrs-analyzer.jar [options] classPath [classPaths...]"); System.err.println("The classPath entries may be directories or jar-files containing the classes to be analyzed\n"); System.err.println("Following available options:\n"); - System.err.println(" -b The backend to choose: swagger (default), plaintext, asciidoc, mardown"); + System.err.println(" -b The backend to choose: swagger (default), plaintext, asciidoc, markdown"); System.err.println(" -cp [:class paths] Additional class paths (separated with colon) which contain classes used in the project (may be directories or jar-files)"); System.err.println(" -sp [:source paths] Optional source paths (separated with colon) needed for JavaDoc analysis (may be directories or jar-files)"); System.err.println(" -X Debug enabled (enabled error debugging information)"); @@ -227,7 +231,7 @@ private static void printUsageAndExit() { System.err.println(" --swaggerSchemes [,schemes] The Swagger schemes: http (default), https, ws, wss"); System.err.println(" --renderSwaggerTags Enables rendering of Swagger tags (default tag will be used per default)"); System.err.println(" --swaggerTagsPathOffset The number at which path position the Swagger tags will be extracted (0 will be used per default)"); - System.err.println(" --ignoredBoundaryClasses Boundary classes which should be ignored by analyze (empty per default)"); + System.err.println(" --ignoredRootResources JAX-RS root resource classes which should be ignored by analyze (empty per default)"); System.err.println(" --noPrettyPrint Don't pretty print inline JSON body representations (will be pretty printed per default)"); System.err.println("\nExample: java -jar jaxrs-analyzer.jar -b swagger -n \"My Project\" -cp ~/libs/lib1.jar:~/libs/project/bin ~/project/target/classes"); System.exit(1); diff --git a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/ProjectAnalyzer.java b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/ProjectAnalyzer.java index cfed32a..c2439ba 100644 --- a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/ProjectAnalyzer.java +++ b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/ProjectAnalyzer.java @@ -42,8 +42,6 @@ import java.util.jar.JarEntry; import java.util.jar.JarFile; -import com.sebastian_daschner.jaxrs_analyzer.utils.RestrictedStringHashSet; - import static com.sebastian_daschner.jaxrs_analyzer.model.JavaUtils.isAnnotationPresent; /** @@ -60,7 +58,7 @@ public class ProjectAnalyzer { // b should have result private final Lock lock = new ReentrantLock(); - private final RestrictedStringHashSet classes = new RestrictedStringHashSet(); + private final Set classes = new HashSet<>(); private final ResultInterpreter resultInterpreter = new ResultInterpreter(); private final BytecodeAnalyzer bytecodeAnalyzer = new BytecodeAnalyzer(); private final JavaDocAnalyzer javaDocAnalyzer = new JavaDocAnalyzer(); @@ -71,18 +69,6 @@ public class ProjectAnalyzer { * @param classPaths The locations of additional class paths (can be directories or jar-files) */ public ProjectAnalyzer(final Set classPaths) { - this( classPaths, new HashSet<>() ); - } - - /** - * Creates a project analyzer with given class path locations where to search for classes. - * Additionally a blacklist of skipped classes is provided. - * - * @param classPaths The locations of additional class paths (can be directories or jar-files) - * @param ignoredBoundaryClassnames Set of full qualified classnames to be skipped on analyze - */ - public ProjectAnalyzer(final Set classPaths, final Set ignoredBoundaryClassnames ) { - classes.getIgnored().addAll( ignoredBoundaryClassnames ); classPaths.forEach(this::addToClassPool); } @@ -91,9 +77,10 @@ public ProjectAnalyzer(final Set classPaths, final Set ignoredBoun * * @param projectClassPaths The project class paths * @param projectSourcePaths The project source file paths + * @param ignoredResources The fully-qualified root resource class names to be ignored * @return The REST resource representations */ - public Resources analyze(final Set projectClassPaths, final Set projectSourcePaths) { + public Resources analyze(Set projectClassPaths, Set projectSourcePaths, Set ignoredResources) { lock.lock(); try { projectClassPaths.forEach(this::addProjectPath); @@ -102,7 +89,10 @@ public Resources analyze(final Set projectClassPaths, final Set proj final JobRegistry jobRegistry = JobRegistry.getInstance(); final Set classResults = new HashSet<>(); - classes.stream().filter(this::isJAXRSRootResource).forEach(c -> jobRegistry.analyzeResourceClass(c, new ClassResult())); + classes.stream() + .filter(this::isJAXRSRootResource) + .filter(r -> !ignoredResources.contains(r)) + .forEach(c -> jobRegistry.analyzeResourceClass(c, new ClassResult())); Pair classResultPair; while ((classResultPair = jobRegistry.nextUnhandledClass()) != null) { diff --git a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/backend/mardown/MarkdownBackend.java b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/backend/markdown/MarkdownBackend.java similarity index 98% rename from src/main/java/com/sebastian_daschner/jaxrs_analyzer/backend/mardown/MarkdownBackend.java rename to src/main/java/com/sebastian_daschner/jaxrs_analyzer/backend/markdown/MarkdownBackend.java index 5cab350..ccb8ff5 100644 --- a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/backend/mardown/MarkdownBackend.java +++ b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/backend/markdown/MarkdownBackend.java @@ -1,4 +1,4 @@ -package com.sebastian_daschner.jaxrs_analyzer.backend.mardown; +package com.sebastian_daschner.jaxrs_analyzer.backend.markdown; import java.util.Optional; import java.util.Set; diff --git a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/utils/RestrictedStringHashSet.java b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/utils/RestrictedStringHashSet.java deleted file mode 100644 index 2a18100..0000000 --- a/src/main/java/com/sebastian_daschner/jaxrs_analyzer/utils/RestrictedStringHashSet.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.sebastian_daschner.jaxrs_analyzer.utils; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - - -public class RestrictedStringHashSet extends HashSet { - - private Set ignored = new HashSet<>(); - - public RestrictedStringHashSet() { - super(); - } - - public RestrictedStringHashSet( Set ignored ) { - super(); - this.ignored = ignored; - } - - @Override - public boolean add( String s ) { - if( ignored.contains( s ) ) - return false; - else - return super.add( s ); - } - - - @Override - public boolean addAll( Collection c ) { - for( String elem : c ) { - if( ignored.contains( elem ) ) - return false; - } - return super.addAll( c ); - } - - - public Set getIgnored() { - return ignored; - } -} diff --git a/src/main/resources/META-INF/services/com.sebastian_daschner.jaxrs_analyzer.backend.Backend b/src/main/resources/META-INF/services/com.sebastian_daschner.jaxrs_analyzer.backend.Backend index 5adb472..5095675 100644 --- a/src/main/resources/META-INF/services/com.sebastian_daschner.jaxrs_analyzer.backend.Backend +++ b/src/main/resources/META-INF/services/com.sebastian_daschner.jaxrs_analyzer.backend.Backend @@ -1,4 +1,4 @@ -com.sebastian_daschner.jaxrs_analyzer.backend.mardown.MarkdownBackend +com.sebastian_daschner.jaxrs_analyzer.backend.markdown.MarkdownBackend com.sebastian_daschner.jaxrs_analyzer.backend.asciidoc.AsciiDocBackend com.sebastian_daschner.jaxrs_analyzer.backend.plaintext.PlainTextBackend com.sebastian_daschner.jaxrs_analyzer.backend.swagger.SwaggerBackend diff --git a/src/test/java/com/sebastian_daschner/jaxrs_analyzer/analysis/ProjectAnalyzerTest.java b/src/test/java/com/sebastian_daschner/jaxrs_analyzer/analysis/ProjectAnalyzerTest.java index d5d6b08..bfc0386 100644 --- a/src/test/java/com/sebastian_daschner/jaxrs_analyzer/analysis/ProjectAnalyzerTest.java +++ b/src/test/java/com/sebastian_daschner/jaxrs_analyzer/analysis/ProjectAnalyzerTest.java @@ -44,6 +44,7 @@ public class ProjectAnalyzerTest { private ProjectAnalyzer classUnderTest; private Path path; + private String ignoredRootResource = "com.sebastian_daschner.jaxrs_test.IgnoredTestResources"; @Before public void setUp() throws MalformedURLException { @@ -66,20 +67,19 @@ public void setUp() throws MalformedURLException { .collect(Collectors.toSet()); classPaths.add(path); - classUnderTest = new ProjectAnalyzer(classPaths, - new HashSet<>( Collections.singletonList( "com.sebastian_daschner.jaxrs_test.IgnoredTestResources" ) ) ); + classUnderTest = new ProjectAnalyzer(classPaths); } @Test public void test() { final long startTime = System.currentTimeMillis(); - final Resources actualResources = classUnderTest.analyze(singleton(path), singleton(path)); + final Resources actualResources = classUnderTest.analyze(singleton(path), singleton(path), singleton(ignoredRootResource)); System.out.println("Project analysis took " + (System.currentTimeMillis() - startTime) + " ms"); final Resources expectedResources = getResources(); assertEquals(expectedResources.getBasePath(), actualResources.getBasePath()); - assertFalse( actualResources.getResources().contains( "ignored" ) ); + assertFalse(actualResources.getResources().contains("ignored")); assertEquals(expectedResources.getResources(), actualResources.getResources()); assertResourceEquals(expectedResources, actualResources); assertEquals(expectedResources.getTypeRepresentations().size(), actualResources.getTypeRepresentations().size()); diff --git a/src/test/java/com/sebastian_daschner/jaxrs_analyzer/backend/markdown/MarkdownBackendTest.java b/src/test/java/com/sebastian_daschner/jaxrs_analyzer/backend/markdown/MarkdownBackendTest.java index cad5477..bb7a675 100644 --- a/src/test/java/com/sebastian_daschner/jaxrs_analyzer/backend/markdown/MarkdownBackendTest.java +++ b/src/test/java/com/sebastian_daschner/jaxrs_analyzer/backend/markdown/MarkdownBackendTest.java @@ -10,7 +10,6 @@ import org.junit.runners.Parameterized; import com.sebastian_daschner.jaxrs_analyzer.backend.Backend; -import com.sebastian_daschner.jaxrs_analyzer.backend.mardown.MarkdownBackend; import com.sebastian_daschner.jaxrs_analyzer.builder.ResourceMethodBuilder; import com.sebastian_daschner.jaxrs_analyzer.builder.ResourcesBuilder; import com.sebastian_daschner.jaxrs_analyzer.builder.ResponseBuilder;