Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 99430 Details for
Bug 231262
NPE in Save Participant while trying to save a file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
The file under edit
File.txt (text/plain), 2.47 KB, created by
Ulli Hafner
on 2008-05-09 04:23:29 EDT
(
hide
)
Description:
The file under edit
Filename:
MIME Type:
Creator:
Ulli Hafner
Created:
2008-05-09 04:23:29 EDT
Size:
2.47 KB
patch
obsolete
>/* > * Copyright (c) Avaloq Evolution AG > * Allmendstr. 140, 8027 Zürich, Switzerland, http://www.avaloq.com > * All Rights Reserved. > * > * This software is the confidential and proprietary information of Avaloq Evolution AG. > * You shall not disclose whole or parts of it and shall use it only in accordance with the terms of the > * license agreement you entered into with Avaloq Evolution AG. > */ > >package com.avaloq.adt.ui.internal.audit; > >import static org.mockito.Mockito.*; > >import java.util.ArrayList; >import java.util.Collection; > >import junit.framework.TestCase; > >import org.eclipse.core.runtime.NullProgressMonitor; > >import com.avaloq.adt.env.core.db.helpers.CompoAuditDBObject; >import com.avaloq.adt.env.core.model.dbobjects.ChangeDBObject; > >/** > * Tests the class {@link ChangeAuditJob}. > */ >@SuppressWarnings("nls") >public class ChangeAuditJobTest extends TestCase { > /** > * Tests whether we correctly run the service to get the auditor states of a change. > */ > public void testRunInBackground() { > ChangeDBObject change = mock(ChangeDBObject.class); > IAuditorService service = mock(IAuditorService.class); > stub(service.getAuditorStates(change)).toReturn(createAuditStates()); > > ChangeAuditJob changeAuditJob = new ChangeAuditJob(change, new ArrayList<AuditInformation>()); > changeAuditJob.setAuditorService(service); > > assertEquals("The expected auditor elements are wrong.", expectedAuditObjects, changeAuditJob.runInBackground(new NullProgressMonitor())); > } > > /** > * Tests whether we correctly propagate the result to our model list. > */ > public void testProcessResult() { > ArrayList<AuditInformation> model = new ArrayList<AuditInformation>(); > ChangeAuditJob changeAuditJob = new ChangeAuditJob(mock(ChangeDBObject.class), model); > > changeAuditJob.processResult(expectedAuditObjects); > assertEquals("The expected size of the model table is wrong.", 2, model.size()); > } > > /** > * Returns the audit states for the tests. > * > * @return the audit states for the tests > */ > private List<CompoAuditDBObject> createAuditStates() { > ArrayList<CompoAuditDBObject> auditStates = new ArrayList<CompoAuditDBObject>(); > auditStates.add(0, mock(CompoAuditDBObject.class)); > auditStates.add(1, mock(CompoAuditDBObject.class)); > > return auditStates; > } >} > > >/* Copyright (c) Avaloq Evolution AG */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 231262
: 99430