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

Examples of com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated


     * Expected outcome is that
     * {@link BuildMemory.MemoryImprint#wereAllBuildsSuccessful()} will return true.
     */
    @Test
    public void testWereAllBuildsSuccessfulOneUnstableOneFailedBothSkippedOneSuccessful() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractProject project = mock(AbstractProject.class);
        SkipVote skipVote = new SkipVote(false, false, false, false);
        GerritTrigger trigger = mock(GerritTrigger.class);
View Full Code Here


     * {@link BuildMemory.MemoryImprint#wereAnyBuildsUnstable()} will return true.
     * As before the skip vote feature was implemented.
     */
    @Test
    public void testWereAllBuildsSuccessfulUnstableOneSuccessfulSkipped() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractProject project = mock(AbstractProject.class);
        SkipVote skipVote = new SkipVote(false, false, false, false);
        GerritTrigger trigger = mock(GerritTrigger.class);
View Full Code Here

     * @param project The project
     * @param ref The ref
     * @return a pactchsetCreated event
     */
    public static PatchsetCreated createPatchsetCreated(String serverName, String project, String ref) {
        PatchsetCreated event = new PatchsetCreated();
        Change change = new Change();
        change.setBranch("branch");
        change.setId("Iddaaddaa123456789");
        change.setNumber("1000");
        Account account = new Account();
        account.setEmail("email@domain.com");
        account.setName("Name");
        change.setOwner(account);
        change.setProject(project);
        change.setSubject("subject");
        change.setUrl("http://gerrit/1000");
        event.setChange(change);
        PatchSet patch = new PatchSet();
        patch.setNumber("1");
        patch.setRevision("9999");
        patch.setRef(ref);
        event.setPatchset(patch);
        event.setProvider(new Provider(serverName, "gerrit", "29418", "ssh", "http://gerrit/", "1"));
        return event;
    }
View Full Code Here

     * {@link BuildMemory.MemoryImprint#wereAnyBuildsUnstable()} will return true.
     * As before the skip vote feature was implemented.
     */
    @Test
    public void testWereAllBuildsSuccessfulUnstableTwoSuccessfulOneSkipped() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractProject project = mock(AbstractProject.class);
        SkipVote skipVote = new SkipVote(true, false, false, false);
        GerritTrigger trigger = mock(GerritTrigger.class);
View Full Code Here

     * {@link BuildMemory.MemoryImprint#wereAllBuildsSuccessful()} will return true
     * As before the skip vote feature was implemented.
     */
    @Test
    public void testWereAllBuildsSuccessfulOneSuccessfulAndSkipped() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractProject project = mock(AbstractProject.class);
        SkipVote skipVote = new SkipVote(true, false, false, false);
        GerritTrigger trigger = mock(GerritTrigger.class);
View Full Code Here

     * {@link BuildMemory.MemoryImprint#wereAnyBuildsUnstable()} will return true.
     * As before the skip vote feature was implemented.
     */
    @Test
    public void testWereAllBuildsSuccessfulOneUnstableAndSkipped() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractProject project = mock(AbstractProject.class);
        SkipVote skipVote = new SkipVote(false, false, true, false);
        GerritTrigger trigger = mock(GerritTrigger.class);
View Full Code Here

     * {@link BuildMemory.MemoryImprint#wereAnyBuildsUnstable()} will return true.
     * As before the skip vote feature was implemented.
     */
    @Test
    public void testWereAllBuildsSuccessfulTwoUnstableBothSkipped() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractProject project = mock(AbstractProject.class);
        SkipVote skipVote = new SkipVote(true, false, true, false);
        GerritTrigger trigger = mock(GerritTrigger.class);
View Full Code Here

     * @param account account that caused event
     * @return a new PatchsetCreated event.
     */
    public static PatchsetCreated createPatchsetCreatedWithAccounts(Account owner, Account uploader, Account account)
    {
        PatchsetCreated event = createPatchsetCreated();
        event.getChange().setOwner(owner);
        event.getPatchSet().setUploader(uploader);
        event.setAccount(account);

        return event;
    }
View Full Code Here

     * {@link BuildMemory.MemoryImprint#wereAllBuildsSuccessful()} will return true.
     * As before the skip vote feature was implemented.
     */
    @Test
    public void testWereAllBuildsSuccessfulTwoSuccessfulBothSkipped() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractProject project = mock(AbstractProject.class);
        SkipVote skipVote = new SkipVote(true, false, false, false);
        GerritTrigger trigger = mock(GerritTrigger.class);
View Full Code Here

     * @throws Exception if so.
     */
    @Test
    public void testObtainFailureMessageNoFilepathConfigured() throws Exception {
        AbstractBuild build = mockBuild("projectX", 2);
        PatchsetCreated event = spy(Setup.createPatchsetCreated());

        ToGerritRunListener toGerritRunListener = Setup.createFailureMessageRunListener(build, event, null);

        BuildMemory memory = Whitebox.getInternalState(toGerritRunListener, BuildMemory.class);
        memory.started(event, build);
View Full Code Here

TOP

Related Classes of com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated

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.