Package com.toedter.gwt.demo.contacts.client.place

Examples of com.toedter.gwt.demo.contacts.client.place.ContactPlace$Tokenizer


    doAnswer(getContactsAnswer).when(clientFactoryMock).getContacts();
  }

  @Test
  public void testGotoPlace() {
    ContactListActivity contactListActivity = new ContactListActivity(new ContactPlace(null), clientFactoryMock);

    ContactPlace contactPlace = new ContactPlace("kai@toedter.com");
    contactListActivity.goTo(contactPlace);

    verify(placeControllerMock).goTo(contactPlace);
  }
View Full Code Here


  }

  @Test
  public void testStartWithEmptyToken() {
    clientFactoryMock.setContacts(null); // force RCP
    ContactListActivity contactListActivity = new ContactListActivity(new ContactPlace(""), clientFactoryMock);
    contactListActivity.start(acceptsOneWidgetMock, eventBusMock);

    verify(contactListViewMock).setPresenter(contactListActivity);
    verify(contactListViewMock).initialize(contacts);
  }
View Full Code Here

  @Test
  public void testStartWithToken() {
    String token = "kai@toedter.com";
    clientFactoryMock.setContacts(null); // force RCP

    ContactListActivity contactListActivity = new ContactListActivity(new ContactPlace(token), clientFactoryMock);
    contactListActivity.start(acceptsOneWidgetMock, eventBusMock);

    verify(contactListViewMock).setPresenter(contactListActivity);
    verify(contactListViewMock).initialize(contacts);
    verify(contactListViewMock).selectInitialContact(contact1);
View Full Code Here

    verify(eventBusMock).fireEvent(any(ContactViewEvent.class));
  }

  @Test
  public void testMayStop() {
    ContactListActivity contactListActivity = new ContactListActivity(new ContactPlace(null), clientFactoryMock);
    contactListActivity.start(acceptsOneWidgetMock, eventBusMock);
    contactListActivity.mayStop();

    verify(contactListViewMock).setPresenter(null);
  }
View Full Code Here

        @Override
        public void onSuccess(Void result) {
          System.out.println("Contact saved");
          clientFactory.setContacts(null);
          clientFactory.getPlaceController().goTo(new ContactPlace(contact.getEmail()));
        }

        @Override
        public void onFailure(Throwable caught) {
          System.err.println("Cannot save contact: " + contact);
View Full Code Here

        @Override
        public void onSuccess(Void result) {
          System.out.println("Contact deleted");
          clientFactory.setContacts(null);
          clientFactory.getPlaceController().goTo(new ContactPlace(""));
        }

        @Override
        public void onFailure(Throwable caught) {
          System.err.println("Cannot delete contact: " + contact);
View Full Code Here

  @Override
  public void select(Contact contact) {
    System.out.println("ContactListActivity.select(): " + token + ":" + contact.getEmail());
    eventBus.fireEvent(new ContactViewEvent(contact));
    if (token == null || (token != null && !token.equals(contact.getEmail()))) {
      goTo(new ContactPlace(contact.getEmail()));
    }
  }
View Full Code Here

  @Override
  public void select(int index) {
    System.out.println("ContactListActivity.select(): " + index);
    Contact contact = clientFactory.getContacts().get(index);
    eventBus.fireEvent(new ContactViewEvent(contact));
    goTo(new ContactPlace(contact.getEmail()));
  }
View Full Code Here

  private static String INCORRECT_MANIFEST_LOCATION = "testData/manifestTest/incorrect"; //$NON-NLS-1$

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

  }

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

TOP

Related Classes of com.toedter.gwt.demo.contacts.client.place.ContactPlace$Tokenizer

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.