Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
java-eventing-shopping-cart with codegen (#282)
- Loading branch information
1 parent
d35860f
commit 31b7ac1
Showing
27 changed files
with
668 additions
and
729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...cart/src/it/java/shopping/product/domain/ProductPopularityValueEntityIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* This code was generated by Akka Serverless tooling. | ||
* As long as this file exists it will not be re-generated. | ||
* You are free to make changes to this file. | ||
*/ | ||
package shopping.product.domain; | ||
|
||
import com.akkaserverless.javasdk.testkit.junit.AkkaServerlessTestkitResource; | ||
import com.google.protobuf.Empty; | ||
import org.junit.ClassRule; | ||
import org.junit.Test; | ||
import shopping.Main; | ||
import shopping.product.api.ProductPopularityApi; | ||
import shopping.product.api.ProductPopularityServiceClient; | ||
|
||
import static java.util.concurrent.TimeUnit.*; | ||
|
||
// Example of an integration test calling our service via the Akka Serverless proxy | ||
// Run all test classes ending with "IntegrationTest" using `mvn verify -Pit` | ||
public class ProductPopularityValueEntityIntegrationTest { | ||
|
||
/** | ||
* The test kit starts both the service container and the Akka Serverless proxy. | ||
*/ | ||
@ClassRule | ||
public static final AkkaServerlessTestkitResource testkit = | ||
new AkkaServerlessTestkitResource(Main.createAkkaServerless()); | ||
|
||
/** | ||
* Use the generated gRPC client to call the service through the Akka Serverless proxy. | ||
*/ | ||
private final ProductPopularityServiceClient client; | ||
|
||
public ProductPopularityValueEntityIntegrationTest() { | ||
client = ProductPopularityServiceClient.create(testkit.getGrpcClientSettings(), testkit.getActorSystem()); | ||
} | ||
|
||
/* | ||
@Test | ||
public void increaseOnNonExistingEntity() throws Exception { | ||
// TODO: set fields in command, and provide assertions to match replies | ||
// client.increase(ProductPopularityApi.IncreasePopularity.newBuilder().build()) | ||
// .toCompletableFuture().get(2, SECONDS); | ||
} | ||
@Test | ||
public void decreaseOnNonExistingEntity() throws Exception { | ||
// TODO: set fields in command, and provide assertions to match replies | ||
// client.decrease(ProductPopularityApi.DecreasePopularity.newBuilder().build()) | ||
// .toCompletableFuture().get(2, SECONDS); | ||
} | ||
@Test | ||
public void getPopularityOnNonExistingEntity() throws Exception { | ||
// TODO: set fields in command, and provide assertions to match replies | ||
// client.getPopularity(ProductPopularityApi.GetProductPopularity.newBuilder().build()) | ||
// .toCompletableFuture().get(2, SECONDS); | ||
} | ||
*/ | ||
} |
Oops, something went wrong.