質問

I've written fit check for my code but for some reason it doesn't work due to class not found exception.

this is the exception: enter image description here

these are the folders: enter image description here

this is the fit code: enter image description here

this is the HTML file of the checks...

enter image description here

According to the exception it's not a problem with my code as much as it's a problem with where the class file is located. Any idea why this happens?

役に立ちましたか?

解決

Eclipse do not recognize your class as Java class, because the fixtures folder is not Source Folder. So CheckSubscribers is not compiled when you run project.

Try to create Fixture as the source folder using wizard.

If purpose of creating CheckSubscriber is testing good practice is the following standard Maven layout. So simply create source folders: src/java to contain project classes and src/test to contain test classes.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top