Package org.apache.isis.core.specsupport.scenarios

Examples of org.apache.isis.core.specsupport.scenarios.InMemoryDB


public class CatalogOfFixturesGlue extends CukeGlueAbstract {

   
    @Before(value={"@unit", "@ToDoItemsFixture"}, order=20000)
    public void unitFixtures() throws Throwable {
        final InMemoryDB inMemoryDB = new InMemoryDBForToDoApp(this.scenarioExecution());
        inMemoryDB.getElseCreate(ToDoItem.class, "Write blog post");
        inMemoryDB.getElseCreate(ToDoItem.class, "Pick up bread");
        final ToDoItem t3 = inMemoryDB.getElseCreate(ToDoItem.class, "Pick up butter");
        t3.setComplete(true);
        putVar("isis", "in-memory-db", inMemoryDB);
    }
View Full Code Here


            }
        });
    }

    private List<ToDoItem> findItems(final Predicate<ToDoItem> predicate) {
        final InMemoryDB inMemoryDB = getVar("isis", "in-memory-db", InMemoryDB.class);
        final List<ToDoItem> items = inMemoryDB.findAll(ToDoItem.class);
        return Lists.newArrayList(Iterables.filter(items, predicate));
    }
View Full Code Here

public class CatalogOfFixturesGlue extends CukeGlueAbstract {

   
    @Before(value={"@unit", "@ToDoItemsFixture"}, order=20000)
    public void unitFixtures() throws Throwable {
        final InMemoryDB inMemoryDB = new InMemoryDBForToDoApp(this.scenarioExecution());
        inMemoryDB.getElseCreate(ToDoItem.class, "Write blog post");
        inMemoryDB.getElseCreate(ToDoItem.class, "Pick up bread");
        final ToDoItem t3 = inMemoryDB.getElseCreate(ToDoItem.class, "Pick up butter");
        t3.setComplete(true);
        putVar("isis", "in-memory-db", inMemoryDB);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.specsupport.scenarios.InMemoryDB

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.