junit.framework.ComparisonFailure: expected:< . > But was: solution
an error occurred while running the MVN instruction: MVN clean test using the DOS window:
[ERROR] Please refer to D:\ learning gadgets \ first semester of junior \ enterprise application construction and management \ experiments \maven_demo\target\surefire-reports for the individual test results
error display from the surefire – reports file to find errors, check the surefire – reports file:
error body is this:
junit.framework.ComparisonFailure: expected:< Hello [World]guoyilin! > but was:< Hello []guoyilin! >
in the test file called assetEquals method, the method to compare the the statement with a specified in parentheses, if different than the error
you can see, The statement returned in the sayHello method is different from the statement specified in the test module, and that’s where the error is, just change the statement to be the same.
Read More:
- Python: How to Fix “Ord() expected string of length 1, but int found”
- Solutions for failure to start Axure RP (including failure to uninstall or install. Net framework)
- HTTP Error 502.5 – Process Failure (How to Fix)
- Go: How to Fix plug-in installation failure in vscode of windows system
- An error was reported on the command line of Vue when it first wrote a small project: expected indentation of 4 spaces but found 6
- Android studio failed to resolve: junit:junit : 4.12 solutions
- org.junit.platform.commons.JUnitException: TestEngine with ID ‘junit-vintage‘ failed to discover tes
- How to Fix Parser rerror: error tokenizing data. C error: expected 2 fields in line 53, saw 3
- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure (How to Fix)
- [Solved] Failed to resolve org.junit.platform:junit-platform-launcher:1.7.2
- How to Fix Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
- Failed to resolve org.junit.platform:junit-platform-launcher:1.7.0
- How to Fix Sklearn ValueError: This solver needs samples of at least 2 classes in the data, but the data
- 12 days after the programmer was dismissed by the company, the former leader asked to go back to the company to explain the code clearly, but he was confused
- Expected indentation of 6 spaces but found 10
- Solution / error of. Net framework 4.0 installation failure HResult 0xc8000222 solution
- Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes
- RuntimeError: Found dtype Double but expected Float”
- An error was reported when idea compiles Java: no symbol was found_ How to solve this problem
- Solving failure executing javac, but could not parse the error