-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pdf session connection #21
Conversation
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.
Good job!
- Tested locally and works as expected
- I added a few comments on some changes I would make
- Most are minor things including missing import statements and potential duplicate code that can be refactored
String currentDirectory = System.getProperty("user.dir"); | ||
String pathName = currentDirectory + "/src/main/java/callhub/connect/pdfs/fall2023.pdf"; | ||
File pdfFile = new File(pathName); | ||
MockMultipartFile sampleFile = new MockMultipartFile( |
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.
Duplication in Test Setup:
- There is some duplication in setting up the
MockMultipartFile
in both test methods. - Consider refactoring this into a separate method or a @beforeeach setup method to reduce duplication!
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.
remind me to fix this after i merge
Can we wait for clean architecture code to be merged first before merging this code |
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.
Overall good with some minor comments
@Test | ||
void testPDFLinkValidSession() throws Exception { | ||
String currentDirectory = System.getProperty("user.dir"); | ||
String pathName = currentDirectory + "/src/main/java/callhub/connect/pdfs/fall2023.pdf"; |
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.
Can we remove this file and create a blank pdf in the test setup for testing instead?
@Test | ||
void testPDFLinkInvalidSession() throws Exception { | ||
String currentDirectory = System.getProperty("user.dir"); | ||
String pathName = currentDirectory + "/src/main/java/callhub/connect/pdfs/fall2023.pdf"; |
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.
Same thing here
…onnect/callhub-backend into pdf-session-connection
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.
Approved + future refactoring
Description
Created endpoint for linking PDF uploads to the current active session
Type of change
2023-11-24.12-03-13.mp4
How Has This Been Tested?
Tested using two JUnit Tests: