Skip to content

Commit

Permalink
Use ParserParityTestHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
fabapp2 committed Nov 1, 2023
1 parent 5529f42 commit e931aea
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.springframework.sbm.boot.autoconfigure.SbmSupportRewriteConfiguration;
import org.springframework.sbm.parsers.maven.RewriteMavenProjectParser;
import org.springframework.sbm.parsers.maven.SbmTestConfiguration;
import org.springframework.sbm.test.util.ParserParityTestHelper;
import org.springframework.sbm.test.util.TestProjectHelper;

import java.nio.file.Path;
Expand Down Expand Up @@ -76,12 +77,11 @@ void parseResources() {
@DisplayName("parse4Modules")
void parse4Modules() {
Path baseDir = TestProjectHelper.getMavenProject("4-modules");
List<Resource> resources = projectScanner.scan(baseDir);

assertThat(resources).hasSize(4);

RewriteProjectParsingResult parsingResult = sut.parse(baseDir, resources);
assertThat(parsingResult.sourceFiles()).hasSize(4);
ParserParityTestHelper.scanProjectDir(baseDir)
.verifyParity((comparingParsingResult, testedParsingResult) -> {
assertThat(comparingParsingResult.sourceFiles()).hasSize(4);
assertThat(testedParsingResult.sourceFiles()).hasSize(4);
});
}

}

0 comments on commit e931aea

Please sign in to comment.