Package net.kindleit.gae.example.model

Examples of net.kindleit.gae.example.model.Message


    @Test
    public void smokeTest() {
        assertNotNull(messageRepository);

        // create
        Message message = new Message();
        message.setText("Test message");

        messageRepository.create(message);

        // read
        Collection<Message> messages = messageRepository.getAll();

        assertNotNull(messages);
        assertEquals(1, messages.size());
        Message storedMessage = messages.iterator().next();

        assertNotNull(storedMessage.getId());
        assertEquals(message.getText(), storedMessage.getText());

        // delete
        messageRepository.deleteById(storedMessage.getId());

        messages = messageRepository.getAll();
        assertEquals(0, messages.size());
    }
View Full Code Here


    @Test
    public void smokeTest() {
        assertNotNull(messageRepository);

        // create
        Message message = new Message();
        message.setText("Test message");

        messageRepository.create(message);

        // read
        Collection<Message> messages = messageRepository.getAll();

        assertNotNull(messages);
        assertEquals(1, messages.size());
        Message storedMessage = messages.iterator().next();

        assertNotNull(storedMessage.getId());
        assertEquals(message.getText(), storedMessage.getText());

        // delete
        messageRepository.deleteById(storedMessage.getId());

        messages = messageRepository.getAll();
        assertEquals(0, messages.size());
    }
View Full Code Here

    protected class SayClickHandler implements ClickHandler {

        @Override
        public void onClick(ClickEvent event) {
            Message message = new Message();
            message.setText(textBox.getText());

            AsyncCallback<Void> callback = new AsyncCallback<Void>() {

                @Override
                public void onFailure(Throwable caught) {
View Full Code Here

    @Test
    public void smokeTest() {
        assertNotNull(messageRepository);

        // create
        Message message = new Message();
        message.setText("Test message");

        messageRepository.create(message);

        // read
        Collection<Message> messages = messageRepository.getAll();

        assertNotNull(messages);
        assertEquals(1, messages.size());
        Message storedMessage = messages.iterator().next();

        assertNotNull(storedMessage.getId());
        assertEquals(message.getText(), storedMessage.getText());

        // delete
        messageRepository.deleteById(storedMessage.getId());

        messages = messageRepository.getAll();
        assertEquals(0, messages.size());
    }
View Full Code Here

    String text = request.getParameter("text");
    if (log.isDebugEnabled()) {
      log.debug("creating message with text: " + text);
    }

    Message message = new Message();
    message.setText(text);
    messageRepository.create(message);
  }
View Full Code Here

TOP

Related Classes of net.kindleit.gae.example.model.Message

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.