-
Notifications
You must be signed in to change notification settings - Fork 39
fix: align Action / View name convention #405
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| /* 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 customer.domain; | ||
|
|
||
| import com.akkaserverless.javasdk.eventsourcedentity.EventSourcedEntity; | ||
| import com.akkaserverless.javasdk.eventsourcedentity.EventSourcedEntityContext; | ||
| import com.akkaserverless.javasdk.testkit.EventSourcedResult; | ||
| import com.google.protobuf.Empty; | ||
| import customer.api.CustomerApi; | ||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import java.util.NoSuchElementException; | ||
| import org.junit.Test; | ||
| import scala.jdk.javaapi.CollectionConverters; | ||
|
|
||
| import static org.junit.Assert.*; | ||
|
|
||
| public class CustomerEntityTest { | ||
|
|
||
| @Test | ||
| public void exampleTest() { | ||
| CustomerEntityTestKit testKit = CustomerEntityTestKit.of(CustomerEntity::new); | ||
| // use the testkit to execute a command | ||
| // of events emitted, or a final updated state: | ||
| // EventSourcedResult<SomeResponse> result = testKit.someOperation(SomeRequest); | ||
| // verify the emitted events | ||
| // ExpectedEvent actualEvent = result.getNextEventOfType(ExpectedEvent.class); | ||
| // assertEquals(expectedEvent, actualEvent) | ||
| // verify the final state after applying the events | ||
| // assertEquals(expectedState, testKit.getState()); | ||
| // verify the response | ||
| // SomeResponse actualResponse = result.getReply(); | ||
| // assertEquals(expectedResponse, actualResponse); | ||
| } | ||
|
|
||
| @Test | ||
| public void createTest() { | ||
| CustomerEntityTestKit testKit = CustomerEntityTestKit.of(CustomerEntity::new); | ||
| // EventSourcedResult<Empty> result = testKit.create(Customer.newBuilder()...build()); | ||
| } | ||
|
|
||
|
|
||
| @Test | ||
| public void changeNameTest() { | ||
| CustomerEntityTestKit testKit = CustomerEntityTestKit.of(CustomerEntity::new); | ||
| // EventSourcedResult<Empty> result = testKit.changeName(ChangeNameRequest.newBuilder()...build()); | ||
| } | ||
|
|
||
|
|
||
| @Test | ||
| public void changeAddressTest() { | ||
| CustomerEntityTestKit testKit = CustomerEntityTestKit.of(CustomerEntity::new); | ||
| // EventSourcedResult<Empty> result = testKit.changeAddress(ChangeAddressRequest.newBuilder()...build()); | ||
| } | ||
|
|
||
|
|
||
| @Test | ||
| public void getCustomerTest() { | ||
| CustomerEntityTestKit testKit = CustomerEntityTestKit.of(CustomerEntity::new); | ||
| // EventSourcedResult<Customer> result = testKit.getCustomer(GetCustomerRequest.newBuilder()...build()); | ||
| } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,12 +25,11 @@ public static AkkaServerless createAkkaServerless() { | |
| CustomerValueEntity::new, | ||
| // end::register[] | ||
| CustomerSummaryByNameView::new, | ||
| CustomerByEmailView::new, | ||
| CustomersResponseByNameView::new, | ||
| CustomerByEmailView::new, | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, here the names didn't change, but the ordering changed. Note that the In any case, the ordering doesn't seen to be deterministic. CustomerByEmailView Alphabetical? Per component type? File system ordering?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I created issue #407 for this. |
||
| CustomerActionImpl::new, | ||
| // tag::register[] | ||
| CustomerByNameView::new | ||
| ); | ||
| CustomerByNameView::new); | ||
| } | ||
| // end::register[] | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compiled all project locally and found some files that were not checked in