Search in sources :

Example 1 with Guid

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);
}
Also used : Note(org.kuali.kfs.krad.bo.Note) Attachment(org.kuali.kfs.krad.bo.Attachment) Guid(org.kuali.kfs.sys.util.Guid) Before(org.junit.Before)

Example 2 with Guid

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;
}
Also used : Note(org.kuali.kfs.krad.bo.Note) Guid(org.kuali.kfs.sys.util.Guid)

Example 3 with Guid

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;
}
Also used : PersistableBusinessObject(org.kuali.kfs.krad.bo.PersistableBusinessObject) PhoneType(org.kuali.kfs.vnd.businessobject.PhoneType) Guid(org.kuali.kfs.sys.util.Guid)

Aggregations

Guid (org.kuali.kfs.sys.util.Guid)3 Note (org.kuali.kfs.krad.bo.Note)2 Before (org.junit.Before)1 Attachment (org.kuali.kfs.krad.bo.Attachment)1 PersistableBusinessObject (org.kuali.kfs.krad.bo.PersistableBusinessObject)1 PhoneType (org.kuali.kfs.vnd.businessobject.PhoneType)1