Package org.waveprotocol.box.server.robots.util

Examples of org.waveprotocol.box.server.robots.util.ConversationUtil


    operationRegistry = mock(OperationServiceRegistry.class);
    validator = mock(OAuthValidator.class);

    EventDataConverterManager converterManager = mock(EventDataConverterManager.class);
    WaveletProvider waveletProvider = mock(WaveletProvider.class);
    ConversationUtil conversationUtil = mock(ConversationUtil.class);
    OAuthServiceProvider oAuthServiceProvider = mock(OAuthServiceProvider.class);
    AccountStore accountStore = mock(AccountStore.class);

    when(accountStore.getAccount(ROBOT)).thenReturn(
        new RobotAccountDataImpl(ROBOT, "", "secret", null, true));
View Full Code Here


    // Type of operation doesn't matter in this case
    OperationRequest request = new OperationRequest("wavelet.fetch", "op1");

    WaveletProvider waveletProvider = mock(WaveletProvider.class);
    EventDataConverter converter = mock(EventDataConverter.class);
    ConversationUtil conversationUtil = mock(ConversationUtil.class);

    OperationContextImpl context =
        new OperationContextImpl(waveletProvider, converter, conversationUtil);

    operationService.execute(request, context, BOB);
View Full Code Here

  private CapturingOperationSink<WaveletOperation> output;
  private ConversationUtil conversationUtil;

  @Override
  protected void setUp() throws Exception {
    conversationUtil = new ConversationUtil(FakeIdGenerator.create());
    eventGenerator = new EventGenerator(ROBOT_NAME, conversationUtil);

    waveletData = WaveletDataImpl.Factory.create(DOCUMENT_FACTORY).create(
        new EmptyWaveletSnapshot(WAVELET_NAME.waveId, WAVELET_NAME.waveletId, ALEX,
            HASH_FACTORY.createVersionZero(WAVELET_NAME), 0L));
View Full Code Here

    converterManager = mock(EventDataConverterManager.class);
    waveletProvider = mock(WaveletProvider.class);
    operationRegistry = mock(OperationServiceRegistry.class);
    EventDataConverter converter = mock(EventDataConverter.class);

    ConversationUtil conversationUtil = mock(ConversationUtil.class);
    applicator = new RobotOperationApplicator(
        converterManager, waveletProvider, operationRegistry, conversationUtil);

    waveletData = WaveletDataUtil.createEmptyWavelet(WAVELET_NAME, ROBOT_PARTICIPANT,
        HASH_FACTORY.createVersionZero(WAVELET_NAME), 0L);
View Full Code Here

  protected void setUp() throws Exception {
    robotSerializer = mock(RobotSerializer.class);
    converterManager = mock(EventDataConverterManager.class);
    waveletProvider = mock(WaveletProvider.class);
    operationRegistry = mock(OperationServiceRegistry.class);
    ConversationUtil conversationUtil = mock(ConversationUtil.class);
    validator = mock(OAuthValidator.class);
    TokenGenerator tokenGenerator = mock(TokenGenerator.class);
    when(tokenGenerator.generateToken(anyInt())).thenReturn(FAKE_TOKEN);
    tokenContainer = new DataApiTokenContainer(tokenGenerator);
View Full Code Here

    waveletData = mock(WaveletData.class);
    when(waveletData.getWaveId()).thenReturn(TEMP_WAVE_ID);
    when(waveletData.getWaveletId()).thenReturn(WAVELET_ID);
    when(waveletData.getRootBlipId()).thenReturn("b+root");

    ConversationUtil conversationUtil = new ConversationUtil(FakeIdGenerator.create());
    context = new OperationContextImpl(waveletProvider, converter, conversationUtil);

    operation =
        new OperationRequest(OperationType.ROBOT_CREATE_WAVELET.method(), OPERATION_ID,
            Parameter.of(ParamsProperty.WAVELET_DATA, waveletData),
View Full Code Here

  @Override
  protected void setUp() {
    MockitoAnnotations.initMocks(this);

    conversationUtil = new ConversationUtil(idGenerator);
    digester = new WaveDigester(conversationUtil);
  }
View Full Code Here

        new OpBasedWavelet(waveletData.getWaveId(), waveletData, CONTEXT_FACTORY,
            ParticipationHelper.DEFAULT, executor, SilentOperationSink.VOID);

    // Make a conversation with an empty root blip
    WaveletBasedConversation.makeWaveletConversational(wavelet);
    ConversationUtil conversationUtil = new ConversationUtil(FakeIdGenerator.create());
    ObservableConversation conversation = conversationUtil.buildConversation(wavelet).getRoot();
    conversation.getRootThread().appendBlip();

    context = new OperationContextImpl(waveletProvider, converter, conversationUtil);
    context.putWavelet(waveletName.waveId, waveletName.waveletId,
        new RobotWaveletData(waveletData, HASH_FACTORY.createVersionZero(waveletName)));
View Full Code Here

    when(waveViewProvider.retrievePerUserWaveView(USER1)).thenReturn(wavesViewUser1);
    when(waveViewProvider.retrievePerUserWaveView(USER2)).thenReturn(wavesViewUser2);
    when(waveViewProvider.retrievePerUserWaveView(SHARED_USER)).thenReturn(wavesViewUser3);

    conversationUtil = new ConversationUtil(idGenerator);
    digester = new WaveDigester(conversationUtil);

    final DeltaStore deltaStore = new MemoryDeltaStore();
    final Executor persistExecutor = MoreExecutors.sameThreadExecutor();
    final Executor storageContinuationExecutor = MoreExecutors.sameThreadExecutor();
View Full Code Here

        new OpBasedWavelet(waveletData.getWaveId(), waveletData, CONTEXT_FACTORY,
            ParticipationHelper.DEFAULT, executor, SilentOperationSink.VOID);

    // Make a conversation with an empty root blip
    WaveletBasedConversation.makeWaveletConversational(wavelet);
    ConversationUtil conversationUtil = new ConversationUtil(FakeIdGenerator.create());
    ObservableConversation conversation = conversationUtil.buildConversation(wavelet).getRoot();
    conversation.getRootThread().appendBlip();

    context = new OperationContextImpl(waveletProvider, converter, conversationUtil);
    context.putWavelet(waveletName.waveId, waveletName.waveletId,
        new RobotWaveletData(waveletData, HASH_FACTORY.createVersionZero(waveletName)));
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.server.robots.util.ConversationUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.