Examples of TodoItem


Examples of dom.todo.ToDoItem

            final Category category, Subcategory subcategory,
            final String user,
            final LocalDate dueBy,
            final BigDecimal cost,
            final ExecutionContext executionContext) {
        ToDoItem newToDo = toDoItems.newToDo(description, category, subcategory, user, dueBy, cost);
        return executionContext.add(this, newToDo);
    }
View Full Code Here

Examples of dom.todo.ToDoItem

        complete(ownedBy, "Buy stamps", executionContext);
        complete(ownedBy, "Write blog post", executionContext);
    }

    private void complete(final String user, final String description, final ExecutionContext executionContext) {
        final ToDoItem toDoItem = findToDoItem(description, user);
        toDoItem.setComplete(true);
        executionContext.add(this, toDoItem);
    }
View Full Code Here

Examples of dom.todo.ToDoItem

     * Hook to initialize if possible.
     */
    @Override
    protected void init(Object obj, String str) {
        if(obj instanceof ToDoItem) {
            ToDoItem toDoItem = (ToDoItem) obj;
            toDoItem.setDescription(str);
        }
    }
View Full Code Here

Examples of dom.todo.ToDoItem

    @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

Examples of dom.todo.ToDoItem

        putVar("todo", "toDoItem", notYetComplete.get(0));
    }
   
    @When("^mark the item as complete$")
    public void mark_it_as_complete() throws Throwable {
        final ToDoItem toDoItem = getVar(null, "toDoItem", ToDoItem.class);
        if(supportsMocks()) {
            final Bulk.InteractionContext bulkInteractionContext = service(Bulk.InteractionContext.class);
            final EventBusService eventBusService = service(EventBusService.class);
            checking(new Expectations() {
                {
                    allowing(bulkInteractionContext);
                    allowing(eventBusService);
                }
            });
            toDoItem.injectBulkInteractionContext(bulkInteractionContext);
            toDoItem.injectEventBusService(eventBusService);
        }
        wrap(toDoItem).completed();
    }
View Full Code Here

Examples of dom.todo.ToDoItem

        wrap(toDoItem).completed();
    }
   
    @Then("^the item is no longer listed as incomplete$")
    public void the_item_is_no_longer_listed_as_incomplete() throws Throwable {
        ToDoItem toDoItem = getVar(null, "toDoItem", ToDoItem.class);
        whetherNotYetCompletedContains(toDoItem, false);
    }
View Full Code Here

Examples of dom.todo.ToDoItem

        }
    }

    @When("^I mark the .*item as not yet complete$")
    public void I_mark_it_as_not_yet_complete() throws Throwable {
        ToDoItem toDoItem = getVar(null, "toDoItem", ToDoItem.class);
        assertThat(toDoItem.isComplete(), is(true));
       
        toDoItem.setComplete(false);
    }
View Full Code Here

Examples of dom.todo.ToDoItem

        toDoItem.setComplete(false);
    }

    @Then("^the .*item is listed as incomplete$")
    public void the_item_is_listed_as_incomplete() throws Throwable {
        ToDoItem toDoItem = getVar(null, "toDoItem", ToDoItem.class);
        whetherNotYetCompletedContains(toDoItem, true);
    }
View Full Code Here

Examples of dom.todo.ToDoItem

                // sent to both the general on(ActionInteractionEvent ev)
                // and also the specific on(final ToDoItem.CompletedEvent ev)
                assertThat(receivedEvents.size(), is(5*2));
                final ToDoItem.CompletedEvent ev = receivedEvents.get(0);

                ToDoItem source = ev.getSource();
                assertThat(source, is(equalTo(unwrap(toDoItem))));
                assertThat(ev.getIdentifier().getMemberName(), is("completed"));
            }
View Full Code Here

Examples of dom.todo.ToDoItem

                // and then
                final ActionInteractionEvent<ToDoItem> ev = toDoItemSubscriptions.mostRecentlyReceivedEvent(ActionInteractionEvent.class);
                assertThat(ev, is(not(nullValue())));

                ToDoItem source = ev.getSource();
                assertThat(source, is(equalTo(unwrap(toDoItem))));
                assertThat(ev.getIdentifier().getMemberName(), is("notYetCompleted"));
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.