-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added unit test cases for Preflight Controller #422
Conversation
Can you please let me know why the pipeline failed? |
Hi, you need to run |
import java.io.InputStream; | ||
|
||
|
||
public class FileReader { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have created this class such that you can mock the readAsStream
functionality right?
I think you don't need a different class, create a spy
of PreflightController in test class and a method in PreflightController which you can mock using spy and everything else will work perfectly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was the purpose for the class.
Ok. I will make the changes.
public class PreflightControllerTest { | ||
|
||
@Mock | ||
UnrestrictedFileUpload unrestrictedFileUpload; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Attempts to fix #399