use of org.kuali.kfs.sys.util.Guid in project cu-kfs by CU-CommunityApps.
the class CuAttachmentServiceImplTest method setUp.
@Before
public void setUp() throws IOException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
attachmentService = new CuAttachmentServiceImpl();
attachmentService.setKualiConfigurationService(new MockConfigurationService());
attachmentService.setAttachmentDao(new MockAttachmentDao());
attachmentService.setNoteService(new MockNoteService());
attachmentService.setAntiVirusService(new MockAntivirusService());
attachment = new Attachment();
attachment.setObjectId(String.valueOf(new Guid()));
attachment.setAttachmentIdentifier(attachment.getObjectId());
Note noteGood = setupMockNote();
attachment.setNote(noteGood);
createAttachmentFile(noteGood, GOOD_FILE_NAME);
noteVirus = setupMockNote();
createAttachmentFile(noteVirus, VIRUS_FILE_NAME);
}
use of org.kuali.kfs.sys.util.Guid in project cu-kfs by CU-CommunityApps.
the class CuAttachmentServiceImplTest method setupMockNote.
private Note setupMockNote() {
Note mockNote = EasyMock.createMock(Note.class);
EasyMock.expect(mockNote.getRemoteObjectIdentifier()).andStubReturn(String.valueOf(new Guid()));
EasyMock.replay(mockNote);
return mockNote;
}
use of org.kuali.kfs.sys.util.Guid in project cu-kfs by CU-CommunityApps.
the class CuAttachmentServiceImplTest method setupPersistableBusinessObject.
private PersistableBusinessObject setupPersistableBusinessObject() {
PersistableBusinessObject pbo = new PhoneType();
pbo.setObjectId(String.valueOf(new Guid()));
attachment.setNote(setupMockNote(pbo.getObjectId()));
return pbo;
}
Aggregations