<commit_before>package io.quarkus.vertx.web;

import static io.vertx.core.http.HttpMethod.DELETE;
import static io.vertx.core.http.HttpMethod.GET;
import static org.hamcrest.Matchers.is;

import java.util.Objects;
import java.util.stream.Collectors;

import javax.enterprise.event.Observes;
import javax.inject.Inject;

import org.hamcrest.Matchers;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.test.QuarkusUnitTest;
import io.quarkus.vertx.ConsumeEvent;
import io.restassured.RestAssured;
import io.vertx.core.eventbus.EventBus;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.RoutingContext;

public class SimpleRouteTest {

    @RegisterExtension
    static final QuarkusUnitTest config = new QuarkusUnitTest()
            .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class).addClasses(SimpleBean.class,
                    SimpleEventBusBean.class, SimpleRoutesBean.class));

    @Test
    public void testSimpleRoute() {
        RestAssured.when().get("/hello").then().statusCode(200).body(is("Hello world!"));
        RestAssured.when().get("/rx-hello").then().statusCode(200).body(is("Hello world!"));
        RestAssured.when().get("/bzuk").then().statusCode(200).body(is("Hello world!"));
        RestAssured.when().get("/hello-event-bus?name=ping").then().statusCode(200).body(is("Hello PING!"));
        RestAssured.when().get("/foo?name=foo").then().statusCode(200).body(is("Hello foo!"));
        RestAssured.when().get("/bar").then().statusCode(200).body(is("Hello bar!"));
        RestAssured.when().get("/delete").then().statusCode(404);<commit_msg>New vert.x behaviour for endpoints on different methods<commit_after>package io.quarkus.vertx.web;

import static io.vertx.core.http.HttpMethod.DELETE;
import static io.vertx.core.http.HttpMethod.GET;
import static org.hamcrest.Matchers.is;

import java.util.Objects;
import java.util.stream.Collectors;

import javax.enterprise.event.Observes;
import javax.inject.Inject;

import org.hamcrest.Matchers;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.test.QuarkusUnitTest;
import io.quarkus.vertx.ConsumeEvent;
import io.restassured.RestAssured;
import io.vertx.core.eventbus.EventBus;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.RoutingContext;

public class SimpleRouteTest {

    @RegisterExtension
    static final QuarkusUnitTest config = new QuarkusUnitTest()
            .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class).addClasses(SimpleBean.class,
                    SimpleEventBusBean.class, SimpleRoutesBean.class));

    @Test
    public void testSimpleRoute() {
        RestAssured.when().get("/hello").then().statusCode(200).body(is("Hello world!"));
        RestAssured.when().get("/rx-hello").then().statusCode(200).body(is("Hello world!"));
        RestAssured.when().get("/bzuk").then().statusCode(200).body(is("Hello world!"));
        RestAssured.when().get("/hello-event-bus?name=ping").then().statusCode(200).body(is("Hello PING!"));
        RestAssured.when().get("/foo?name=foo").then().statusCode(200).body(is("Hello foo!"));
        RestAssured.when().get("/bar").then().statusCode(200).body(is("Hello bar!"));
        RestAssured.when().get("/delete").then().statusCode(405);
{'fraction_non_alphanumeric': 0.16109852774631936, 'fraction_numerical': 0.01189127972819932, 'mean_word_length': 4.707592891760905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1570091', 'n_tokens_mistral': 1179, 'n_tokens_neox': 1125, 'n_words': 150}