@BeforeMethod(groups = "unit")
  public void init() {
    factory = new RawExtractJobFactoryImpl();
    stagingDirectoryFactory = EasyMock.createMock(CredentialedStagingDirectoryFactory.class);
    stagingDirectory = EasyMock.createMock(StagingDirectory.class);
    EasyMock.expect(stagingDirectory.getAbsolutePath()).andStubReturn(PATH);

    EasyMock.expect(stagingDirectory.getSep()).andStubReturn("/");
    final Supplier<DisposableResourceTracker> trackerSupplier = EasyMockUtils.createMockSupplier();
    tracker = createMock(DisposableResourceTracker.class);
    expect(trackerSupplier.get()).andReturn(tracker);
    replay(trackerSupplier);
    rawPopulator = EasyMock.createMock(InputContext.class);

    converter = EasyMock.createMock(DTAToMzXMLConverter.class);
    options = new DTAToMzXMLOptions();

    factory.setDtaToMzXMLConverter(converter);
    factory.setDtaToMxXMLOptions(options);
    factory.setDisposableResourceTrackerSupplier(trackerSupplier);
    factory.setCredentialedStagingDirectoryFactory(stagingDirectoryFactory);
    mockObjects =
        MockObjectCollection.fromObjects(
            stagingDirectoryFactory, stagingDirectory, tracker, rawPopulator, converter);
  }
Пример #2
0
  @BeforeMethod(groups = "unit")
  public void init() {
    service = new StorageManagerImpl();
    gridId = UUID.randomUUID().toString();
    fileId = UUID.randomUUID().toString();
    fileId2 = UUID.randomUUID().toString();
    accessProvider = EasyMock.createMock(AccessProvider.class);
    authorizationProvider = EasyMock.createMock(AuthorizationProvider.class);
    fileService = EasyMock.createMock(FileService.class);

    service.setAccessProvider(accessProvider);
    service.setAuthorizationProvider(authorizationProvider);
    service.setFileService(fileService);

    mockObjects =
        MockObjectCollection.fromObjects(accessProvider, authorizationProvider, fileService);
  }