Пример #1
0
  public void runPlanner() throws Exception {
    Screen goal =
        (Screen)
            TestUtils.buildBB(
                catalogue.getServerURL(), "screen", "data/json/screens/amazonOrderCode.json");
    catalogue.addScreen(goal);
    catalogue.addScreen(
        (Screen)
            TestUtils.buildBB(
                catalogue.getServerURL(), "screen", "data/json/screens/amazonSearchCode.json"));
    catalogue.addScreen(
        (Screen)
            TestUtils.buildBB(
                catalogue.getServerURL(), "screen", "data/json/screens/amazonListCode.json"));
    catalogue.addScreen(
        (Screen)
            TestUtils.buildBB(
                catalogue.getServerURL(), "screen", "data/json/screens/amazonProductCode.json"));
    catalogue.addScreen(
        (Screen)
            TestUtils.buildBB(
                catalogue.getServerURL(), "screen", "data/json/screens/amazonPriceCode.json"));
    catalogue.addScreen(
        (Screen)
            TestUtils.buildBB(
                catalogue.getServerURL(), "screen", "data/json/screens/amazonShoppingCode.json"));
    catalogue.addScreen(
        (Screen)
            TestUtils.buildBB(
                catalogue.getServerURL(), "screen", "data/json/screens/amazonSuggestionCode.json"));

    Assert.assertEquals(7, catalogue.getScreens().size());
    HashSet<BuildingBlock> canvas = new HashSet<BuildingBlock>();
    canvas.add(goal);
    List<Plan> plans = catalogue.searchPlans(goal.getUri(), canvas);
    Assert.assertEquals(4, plans.size());
  }
Пример #2
0
 protected void setUp() throws Exception {
   super.setUp();
   catalogue = CatalogueAccessPoint.getCatalogue("test");
   catalogue.clear();
 }