Skip to content
Open
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
10 changes: 3 additions & 7 deletions java/developing-applications/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ To verify the proper discount application in our example, we can run a `Select`
public class CatalogServiceTest {

@Autowired
@Qualifier(CatalogService_.CDS_NAME)
private CqnService catalogService;
private CatalogService catalogService;

@Test
public void discountApplied() {
Expand All @@ -172,8 +171,7 @@ Looking at the `onSubmitOrder` method from our example above we see that it uses
public class CatalogServiceTest {

@Autowired
@Qualifier(CatalogService_.CDS_NAME)
private CqnService catalogService;
private CatalogService catalogService;

@Test
public void submitOrder() {
Expand All @@ -196,8 +194,7 @@ In the same way you can verify that the `ServiceException` is being thrown when
public class CatalogServiceTest {

@Autowired
@Qualifier(CatalogService_.CDS_NAME)
private CqnService catalogService;
private CatalogService catalogService;

@Test
public void submitOrderExceedingStock() {
Expand All @@ -206,7 +203,6 @@ public class CatalogServiceTest {
// ID of a book known to have a stock quantity of 22
context.setBook("4a519e61-3c3a-4bd9-ab12-d7e0c5329933");
context.setQuantity(30);
catalogService.emit(context);

assertThrows(ServiceException.class, () -> catalogService.emit(context), context.getQuantity() + " exceeds stock for book");
}
Expand Down
Loading