-
Notifications
You must be signed in to change notification settings - Fork 13
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
Bxc 4859 file object test #1879
Conversation
eq(MediaType.TEXT_PLAIN_VALUE), any(), isNull(), modelCaptor.capture()); | ||
|
||
assertNull(modelCaptor.getValue()); |
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.
we don't really need to use a captor get check for null
@Test | ||
public void addBinaryTest() { | ||
var binPid = getTechnicalMetadataPid(pid); | ||
fileObject.addBinary(binPid, storageUri, "file.txt", |
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.
It'd be good to verify that addBinary returns the binary it created, at least for this baseline addBinary test
when(driver.getRepositoryObject(eq(technicalMetadataPid), eq(BinaryObject.class))).thenReturn(technicalMdBinObj); | ||
|
||
assertTrue(fileObject.getBinaryObjects().contains(origFileBinObj)); | ||
assertTrue(fileObject.getBinaryObjects().contains(technicalMdBinObj)); |
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.
assert that 2 binaries were returned
https://unclibrary.atlassian.net/browse/BXC-4859