Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup codestarter test #33181

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
import static org.hamcrest.CoreMatchers.containsString;

@QuarkusTest
public class LambdaHandlerTest {

class LambdaHandlerTest {
@Test
public void testSimpleLambdaSuccess() throws Exception {
void testSimpleLambdaSuccess() throws Exception {
// you test your lambdas by invoking on http://localhost:8081
// this works in dev mode too

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class FunqyIT extends FunqyTest {
class FunqyIT extends FunqyTest {

// Run the same tests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import static org.hamcrest.CoreMatchers.containsString;

@QuarkusTest
public class FunqyTest {

class FunqyTest {
@Test
public void testFunqyLambda() throws Exception {
void testFunqyLambda() throws Exception {
// you test your lambdas by invoking on http://localhost:8081
// this works in dev mode too

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@WithFunction(value = FunctionType.FUNQY_CLOUD_EVENTS, functionName = "helloCloudEvent")
class GreetingFunctionsCloudEventsTest {
@Test
public void testHelloCloudEvent() {
void testHelloCloudEvent() {
given()
.body("{\n" +
" \"bucket\": \"MY_BUCKET\",\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@WithFunction(value = FunctionType.FUNQY_BACKGROUND, functionName = "helloPubSubWorld")
class GreetingFunctionsPubSubTest {
@Test
public void testHelloPubSubWorld() {
void testHelloPubSubWorld() {
given()
.body("{\"data\":{\"data\":\"world\"}}")
.when()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@WithFunction(value = FunctionType.FUNQY_BACKGROUND, functionName = "helloGCSWorld")
class GreetingFunctionsStorageTest {
@Test
public void testHelloGCSWorld() {
void testHelloGCSWorld() {
given()
.body("{\"data\":{\"name\":\"hello.txt\"}}")
.when()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class FunqyIT extends FunqyTest {
class FunqyIT extends FunqyTest {

// Run the same tests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
import static org.hamcrest.Matchers.notNullValue;

@QuarkusTest
public class FunqyTest {

class FunqyTest {
@Test
public void testCloudEvent() {
void testCloudEvent() {
RestAssured.given().contentType("application/json")
.header("ce-specversion", "1.0")
.header("ce-id", UUID.randomUUID().toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@WithFunction(FunctionType.BACKGROUND)
class HelloWorldBackgroundFunctionTest {
@Test
public void testAccept() {
void testAccept() {
given()
.body("{\"data\":{\"name\":\"hello.txt\"}}")
.when()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@WithFunction(FunctionType.CLOUD_EVENTS)
class HelloWorldCloudEventsFunctionTest {
@Test
public void testAccept() {
void testAccept() {
given()
.body("{\n" +
" \"bucket\": \"MY_BUCKET\",\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@WithFunction(FunctionType.HTTP)
class HelloWorldHttpFunctionTest {
@Test
public void testService() {
void testService() {
when()
.get()
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Unit test for Function class.
*/
@QuarkusTest
public class FunctionTest {
class FunctionTest {

@Inject
Function function;
Expand All @@ -36,7 +36,7 @@ public class FunctionTest {
* Unit test for HttpTriggerJava method.
*/
@Test
public void testHttpTriggerJava() throws Exception {
void testHttpTriggerJava() throws Exception {
// Setup
@SuppressWarnings("unchecked")
final HttpRequestMessage<Optional<String>> req = mock(HttpRequestMessage.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import static org.hamcrest.CoreMatchers.is;

@QuarkusTest
public class GreetingTest {

class GreetingTest {
@Test
public void testHelloEndpoint() {
void testHelloEndpoint() {
given()
.when().get("/hello")
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
import static org.hamcrest.Matchers.containsString;

@QuarkusTest
public class MyFunctionsTest {

class MyFunctionsTest {
@Test
public void testFun() {
void testFun() {
given()
.post("/fun")
.then()
Expand All @@ -20,7 +19,7 @@ public void testFun() {
}

@Test
public void testFunWithName() {
void testFunWithName() {
given()
.contentType(ContentType.JSON)
.body("{\"name\": \"Friend\"}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
import org.junit.jupiter.api.Test;

@QuarkusTest
public class HelloGrpcServiceTest {

class HelloGrpcServiceTest {
@GrpcClient
HelloGrpc helloGrpc;

@Test
public void testHello() {
void testHello() {
HelloReply reply = helloGrpc
.sayHello(HelloRequest.newBuilder().setName("Neo").build()).await().atMost(Duration.ofSeconds(5));
assertEquals("Hello Neo!", reply.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class {resource.class-name}IT extends {resource.class-name}Test {
class {resource.class-name}IT extends {resource.class-name}Test {
// Execute the same tests but in packaged mode.
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import static org.hamcrest.CoreMatchers.is;

@QuarkusTest
public class {resource.class-name}Test {

class {resource.class-name}Test {
@Test
public void testHelloEndpoint() {
void testHelloEndpoint() {
given()
.when().get("{resource.path}")
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class {resource.class-name}IT extends {resource.class-name}Test {
class {resource.class-name}IT extends {resource.class-name}Test {
// Execute the same tests but in packaged mode.
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import static org.hamcrest.CoreMatchers.is;

@QuarkusTest
public class {resource.class-name}Test {

class {resource.class-name}Test {
@Test
public void testHelloEndpoint() {
void testHelloEndpoint() {
given()
.when().get("{resource.path}")
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class {resource.class-name}IT extends {resource.class-name}Test {
class {resource.class-name}IT extends {resource.class-name}Test {
// Execute the same tests but in packaged mode.
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import static org.hamcrest.CoreMatchers.is;

@QuarkusTest
public class {resource.class-name}Test {

class {resource.class-name}Test {
@Test
public void testHelloEndpoint() {
void testHelloEndpoint() {
given()
.when().get("{resource.path}")
.then()
Expand Down
Loading