BAEL-3444: Simplified example steps
This commit is contained in:
-1
@@ -5,7 +5,6 @@ import org.junit.runner.RunWith;
|
||||
import io.cucumber.junit.Cucumber;
|
||||
import io.cucumber.junit.CucumberOptions;
|
||||
|
||||
|
||||
@RunWith(Cucumber.class)
|
||||
@CucumberOptions(features = "classpath:features/book-store.feature")
|
||||
public class BookStoreIntegrationTest {
|
||||
|
||||
-4
@@ -18,7 +18,6 @@ public class BookStoreRegistryConfigurer implements TypeRegistryConfigurer {
|
||||
@Override
|
||||
public void configureTypeRegistry(TypeRegistry typeRegistry) {
|
||||
typeRegistry.defineDataTableType(new DataTableType(BookCatalog.class, new BookTableTransformer()));
|
||||
|
||||
}
|
||||
|
||||
private static class BookTableTransformer implements TableTransformer<BookCatalog> {
|
||||
@@ -34,11 +33,8 @@ public class BookStoreRegistryConfigurer implements TypeRegistryConfigurer {
|
||||
.map(fields -> new Book(fields.get(0), fields.get(1)))
|
||||
.forEach(catalog::addBook);
|
||||
|
||||
System.out.println(catalog);
|
||||
|
||||
return catalog;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -43,8 +43,8 @@ public class BookStoreRunSteps {
|
||||
}
|
||||
}
|
||||
|
||||
@Given("^I have the following books in the store with custom table parsing$")
|
||||
public void haveBooksInTheStoreByListOfDomainObjects(BookCatalog catalog) {
|
||||
@Given("^I have the following books in the store with transformer$")
|
||||
public void haveBooksInTheStoreByListOfTransformer(BookCatalog catalog) {
|
||||
store.addAllBooks(catalog.getBooks());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user