Package com.sonymobile.tools.gerrit.gerritevents.dto.attr

Examples of com.sonymobile.tools.gerrit.gerritevents.dto.attr.PatchSet


     */
    @Test
    public void shouldNotFireOnTrivialRebaseWhenExcluded() {
        PluginPatchsetCreatedEvent pluginPatchsetCreatedEvent = new PluginPatchsetCreatedEvent(false, true, false);
        PatchsetCreated patchsetCreated = new PatchsetCreated();
        patchsetCreated.setPatchset(new PatchSet());

        //should fire only on regular patchset (no drafts)
        assertTrue(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated));
        patchsetCreated.getPatchSet().setKind(GerritChangeKind.TRIVIAL_REBASE);
        assertFalse(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated));
View Full Code Here


     */
    @Test
    public void shouldNotFireOnNoCodeChangeWhenExcluded() {
        PluginPatchsetCreatedEvent pluginPatchsetCreatedEvent = new PluginPatchsetCreatedEvent(false, false, true);
        PatchsetCreated patchsetCreated = new PatchsetCreated();
        patchsetCreated.setPatchset(new PatchSet());

        //should fire only on regular patchset (no drafts)
        assertTrue(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated));
        patchsetCreated.getPatchSet().setKind(GerritChangeKind.NO_CODE_CHANGE);
        assertFalse(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated));
View Full Code Here

            RepositoryModifiedEvent repositoryModifiedEvent = (RepositoryModifiedEvent)gerritCause.getEvent();
            String eventDesc = getEventDescription(gerritCause.getEvent());
            logger.debug(eventDesc);
            Date createdOnDate = null;
            if (repositoryModifiedEvent instanceof ChangeBasedEvent) {
                PatchSet patchset = ((ChangeBasedEvent)repositoryModifiedEvent).getPatchSet();
                if (patchset != null) {
                    createdOnDate = patchset.getCreatedOn();
                }
            }

            if (replicationCache.isExpired(gerritCause.getEvent().getReceivedOn())) {
                logger.trace(eventDesc + " has expired");
View Full Code Here

     * @param change the change info.
     * @param patch the patchSet info.
     */
    public void fromJson(JSONObject change, JSONObject patch) {
        setChange(new Change(change));
        setPatchset(new PatchSet(patch));
    }
View Full Code Here

            JSONObject jsonChange,
            JSONObject jsonPatchSet,
            String serverName) {
        List<ParameterValue> parameters = new LinkedList<ParameterValue>();
        Change change = new Change(jsonChange);
        PatchSet patchSet = new PatchSet(jsonPatchSet);
        PatchsetCreated event = new PatchsetCreated();
        Provider provider = createProviderFromGerritServer(serverName);
        event.setChange(change);
        event.setPatchset(patchSet);
        event.setProvider(provider);
View Full Code Here

TOP

Related Classes of com.sonymobile.tools.gerrit.gerritevents.dto.attr.PatchSet

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.