Skip to content
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

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Bxc 4859 file object test #1879

merged 3 commits into from
Feb 21, 2025

Conversation

sharonluong
Copy link
Contributor

Comment on lines 124 to 126
eq(MediaType.TEXT_PLAIN_VALUE), any(), isNull(), modelCaptor.capture());

assertNull(modelCaptor.getValue());
Copy link
Member

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",
Copy link
Member

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));
Copy link
Member

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

@bbpennel bbpennel merged commit 4c206ee into main Feb 21, 2025
5 checks passed
@bbpennel bbpennel deleted the BXC-4859-file-object-test branch February 21, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants