use of ca.corefacility.bioinformatics.irida.service.remote.ProjectSynchronizationService in project irida by phac-nml.
the class ProjectSynchronizationServiceTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
syncService = new ProjectSynchronizationService(projectService, sampleService, objectService, metadataTemplateService, projectRemoteService, sampleRemoteService, singleEndRemoteService, pairRemoteService, tokenService);
api = new RemoteAPI();
expired = new Project();
expired.setId(1L);
RemoteStatus expStatus = new RemoteStatus("http://expired", api);
expStatus.setId(1L);
expStatus.setLastUpdate(new Date(1));
expStatus.setSyncStatus(RemoteStatus.SyncStatus.SYNCHRONIZED);
expired.setSyncFrequency(ProjectSyncFrequency.WEEKLY);
expired.setRemoteStatus(expStatus);
upToDate = new Project();
upToDate.setId(2L);
RemoteStatus upToDateStatus = new RemoteStatus("http://upToDate", api);
upToDateStatus.setId(2L);
upToDateStatus.setLastUpdate(new Date());
upToDateStatus.setSyncStatus(RemoteStatus.SyncStatus.SYNCHRONIZED);
upToDate.setSyncFrequency(ProjectSyncFrequency.WEEKLY);
upToDate.setRemoteStatus(upToDateStatus);
neverSync = new Project();
neverSync.setId(3L);
RemoteStatus neverSyncStatus = new RemoteStatus("http://never", api);
neverSyncStatus.setId(3L);
neverSyncStatus.setLastUpdate(new Date());
neverSyncStatus.setSyncStatus(RemoteStatus.SyncStatus.SYNCHRONIZED);
neverSync.setSyncFrequency(ProjectSyncFrequency.NEVER);
neverSync.setRemoteStatus(neverSyncStatus);
}
Aggregations