Skip to content

Commit

Permalink
#550 added test NoOpQueueSplitterTest
Browse files Browse the repository at this point in the history
  • Loading branch information
zorba71 committed Feb 6, 2024
1 parent 4a4eecd commit 7f30b4b
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.swisspush.gateleen.queue.queuing.splitter;

import io.vertx.core.http.HttpServerRequest;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;

public class NoOpQueueSplitterTest {

@Test
public void splitKeepSameQueue() {

// Given
NoOpQueueSplitter splitter = new NoOpQueueSplitter();
HttpServerRequest request = mock(HttpServerRequest.class);

// When
splitter.initialize().onComplete( event -> {

// Then
assertEquals("my-queue-01", splitter.convertToSubQueue("my-queue-01", request));
assertEquals("my-queue-02", splitter.convertToSubQueue("my-queue-02", request));
assertEquals("my-queue-03", splitter.convertToSubQueue("my-queue-03", request));
});
}
}

0 comments on commit 7f30b4b

Please sign in to comment.