@Test public void toStatus() { final ChangeSetMessage changeSet = ChangeSetMessage.create( null, null, null, new ChannelChange[ 0 ], new EntityChange[ 0 ] ); final MessageResponse action = new MessageResponse( 1, changeSet, null ); action.incChannelAddCount(); action.incChannelAddCount(); action.incChannelRemoveCount(); action.incChannelRemoveCount(); action.incChannelRemoveCount(); action.incChannelUpdateCount(); action.incEntityUpdateCount(); action.incEntityRemoveCount(); action.incEntityRemoveCount(); action.incEntityLinkCount(); final DataLoadStatus status = action.toStatus(); assertEquals( status.getRequestId(), null ); assertEquals( status.getChannelAddCount(), 2 ); assertEquals( status.getChannelUpdateCount(), 1 ); assertEquals( status.getChannelRemoveCount(), 3 ); assertEquals( status.getEntityUpdateCount(), 1 ); assertEquals( status.getEntityRemoveCount(), 2 ); assertEquals( status.getEntityLinkCount(), 1 ); }
@Nonnull DataLoadStatus toStatus() { assert Replicant.areSpiesEnabled(); return new DataLoadStatus( _message.getRequestId(), getChannelAddCount(), getChannelUpdateCount(), getChannelRemoveCount(), getEntityUpdateCount(), getEntityRemoveCount(), getEntityLinkCount() ); }
MessageResponse { @Nonnull DataLoadStatus toStatus() { assert Replicant.areSpiesEnabled(); return new DataLoadStatus( _message.getRequestId(), getChannelAddCount(), getChannelUpdateCount(), getChannelRemoveCount(), getEntityUpdateCount(), getEntityRemoveCount(), getEntityLinkCount() ); } }
MessageResponse { @Nonnull DataLoadStatus toStatus() { assert Replicant.areSpiesEnabled(); return new DataLoadStatus( _message.getRequestId(), getChannelAddCount(), getChannelUpdateCount(), getChannelRemoveCount(), getEntityUpdateCount(), getEntityRemoveCount(), getEntityLinkCount() ); } MessageResponse( final int schemaId,
                   @Nonnull final ServerToClientMessage message,
                   @Nullable final RequestEntry request ); }
MessageResponse { @Nonnull DataLoadStatus toStatus() { assert Replicant.areSpiesEnabled(); return new DataLoadStatus( _message.getRequestId(), getChannelAddCount(), getChannelUpdateCount(), getChannelRemoveCount(), getEntityUpdateCount(), getEntityRemoveCount(), getEntityLinkCount() ); } MessageResponse( final int schemaId,
                   @Nonnull final ServerToClientMessage message,
                   @Nullable final RequestEntry request ); @Override String toString(); }
MessageResponse { @Nonnull DataLoadStatus toStatus() { assert Replicant.areSpiesEnabled(); return new DataLoadStatus( _message.getRequestId(), getChannelAddCount(), getChannelUpdateCount(), getChannelRemoveCount(), getEntityUpdateCount(), getEntityRemoveCount(), getEntityLinkCount() ); } MessageResponse( final int schemaId,
                   @Nonnull final ServerToClientMessage message,
                   @Nullable final RequestEntry request ); @Override String toString();  }