Package com.google.testing.testify.risk.frontend.model

Examples of com.google.testing.testify.risk.frontend.model.Checkin


        test.setState(item.getString("result"));
        test.setStateDate(item.getLong("resultDate"));
        dataService.addTestCase(test);
      } else if (json.has("checkin")) {
        item = json.getJSONObject("checkin");
        Checkin checkin = new Checkin();
        checkin.setParentProjectId(item.getLong("projectId"));
        checkin.setExternalId(item.getLong("checkinId"));
        checkin.setSummary(item.getString("summary"));
        checkin.setDirectoriesTouched(
            Sets.newHashSet(StringUtil.csvToList(item.getString("directories"))));
        checkin.setChangeUrl(item.getString("url"));
        checkin.setState(item.getString("state"));
        checkin.setStateDate(item.getLong("stateDate"));
        dataService.addCheckin(checkin);
      } else {
        LOG.severe("No applicable data found for json: " + json.toString());
      }
    } catch (JSONException e) {
View Full Code Here


    dataService.addBug(bug3);
    bugs.add(bug3);

    // Checkins.
    LOG.info("Creating checkins.");
    Checkin checkin1 = new Checkin();
    checkin1.setChangeUrl("http://example/code/16358580");
    checkin1.setExternalId(16358580L);
    checkin1.addDirectoryTouched("java/com/example/DoorKnobFactoryFactory");
    checkin1.setParentProjectId(projectId);
    checkin1.setTargetCapabilityId(capabilities.get(0).getCapabilityId());
    checkin1.setStateDate(System.currentTimeMillis() - (84000000 * 2));
    checkin1.setSummary("Add factory to create a factory to provide Door Knob objects.");
    dataService.addCheckin(checkin1);

    Checkin checkin2 = new Checkin();
    checkin2.setChangeUrl("http://example/code/16358581");
    checkin2.setExternalId(16358581L);
    checkin2.addDirectoryTouched("java/com/example/Search");
    checkin2.setParentProjectId(projectId);
    checkin2.setStateDate(System.currentTimeMillis() - (84000000 * 7));
    checkin2.setSummary("Search engine optimizations");
    dataService.addCheckin(checkin2);

    // Tests.
    LOG.info("Creating tests.");
    TestCase testcase1 = new TestCase();
View Full Code Here

        @Override
        public void onClick(ClickEvent event) {
          long id = Long.parseLong((options.getValue(options.getSelectedIndex())));
          presenter.assignCheckinToCapability(capability.getCapabilityId(), id);
          disclosure.setOpen(false);
          Checkin checkin = getCheckinById(id);
          checkin.setTargetCapabilityId(capability.getCapabilityId());
          refresh();
        }
      });
    addForm.add(button);
    disclosure.setAnimationEnabled(true);
View Full Code Here

    changeGrid.resize(capabilityCheckins.size() + 1, 1);
    changeGrid.setWidget(0, 0, buildCheckinHeaderWidget(
        "Recent Code Changes (" + capabilityCheckins.size() + " total)", "add code change"));

    for (int i = 0; i < capabilityCheckins.size(); i++) {
      Checkin checkin = capabilityCheckins.get(i);
      HorizontalPanel panel = new HorizontalPanel();
      panel.add(new Image("/images/teststate-passed.png"));
      Anchor anchor = new Anchor(checkin.getLinkText(), checkin.getLinkUrl());
      anchor.setTarget("_blank");
      panel.add(anchor);
      Label statusLabel = new Label();
      statusLabel.setText(" - submitted " + getDateText(checkin.getStateDate()));
      panel.add(statusLabel);
      changeGrid.setWidget(i + 1, 0, panel);
    }
  }
View Full Code Here

public class CheckinDirectoryTreeNodeTest extends TestCase {

  /** Returns a built checkin tree for testing purposes. */
  private CheckinDirectoryTreeNode getTestTree1() {
    CheckinDirectoryTreeNode root = new CheckinDirectoryTreeNode();
    root.addCheckin("alpha", new Checkin());
    root.addCheckin("alpha/beta", new Checkin());
    root.addCheckin("alpha/beta/gamma", new Checkin());
    // Forward and backslashes should be treated the same.
    root.addCheckin("alpha\\beta\\gamma", new Checkin());
    root.addCheckin("alpha/beta/delta", new Checkin());

    return root;
  }
View Full Code Here

    return root;
  }

  /** Get list of checkins to use for directory tree construction. */
  private List<Checkin> getTestCheckins() {
    Checkin checkin1 = new Checkin();
    checkin1.addDirectoryTouched("//depot/testify/risk/frontend/client/");
    checkin1.addDirectoryTouched("//depot/testify/risk/frontend/client/view/impl/");
    checkin1.addDirectoryTouched("//depot/testify/risk/frontend/public/");
    checkin1.addDirectoryTouched("//depot/testify/risk/frontend/public/images/");

    Checkin checkin2 = new Checkin();
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/client/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/client/dataprovider/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/client/dataprovider/impl/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/client/presenter/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/client/view/impl/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/client/view/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/model/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/server/impl/");
    checkin2.addDirectoryTouched("//depot/testify/risk/frontend/shared/");

    return Lists.newArrayList(checkin1, checkin2);
  }
View Full Code Here

TOP

Related Classes of com.google.testing.testify.risk.frontend.model.Checkin

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.