Package hudson.scm.subversion.WorkspaceUpdater

Examples of hudson.scm.subversion.WorkspaceUpdater.UpdateTask


   
    private static final Date NOW = new Date();
   
    @Test
    public void testGetRevisionFromTimestamp() {
        UpdateTask updateTask = createUpdateTask();
       
        ModuleLocation l = new ModuleLocation("remote", "local");
       
        SVNRevision revision = updateTask.getRevision(l);
        assertEquals(NOW, revision.getDate());
        assertEquals(-1L, revision.getNumber());
    }
View Full Code Here


        assertEquals(-1L, revision.getNumber());
    }
   
    @Test
    public void testRevisionFromRevisionParametersOverrideTimestamp() {
        UpdateTask updateTask = createUpdateTask();
       
        updateTask.revisions = new RevisionParameterAction(new SubversionSCM.SvnInfo("remote", 4711));
       
        ModuleLocation l = new ModuleLocation("remote", "local");
       
        SVNRevision revision = updateTask.getRevision(l);
        assertEquals(4711L, revision.getNumber());
        assertNull(revision.getDate());
    }
View Full Code Here

        assertNull(revision.getDate());
    }

    @Test
    public void testRevisionInUrlOverridesEverything() {
        UpdateTask updateTask = createUpdateTask();

        updateTask.revisions = new RevisionParameterAction(new SubversionSCM.SvnInfo("remote", 4711));
       
        ModuleLocation l = new ModuleLocation("remote@12345", "local");
       
        SVNRevision revision = updateTask.getRevision(l);
        assertEquals(12345L, revision.getNumber());
        assertNull(revision.getDate());
    }
View Full Code Here

        assertNull(revision.getDate());
    }
   
    @Test
    public void testRevisionInUrlOverridesEverything_HEAD() {
        UpdateTask updateTask = createUpdateTask();

        updateTask.revisions = new RevisionParameterAction(new SubversionSCM.SvnInfo("remote", 4711));
       
        ModuleLocation l = new ModuleLocation("remote@HEAD", "local");
       
        SVNRevision revision = updateTask.getRevision(l);
        assertEquals(SVNRevision.HEAD.getName(), revision.getName());
        assertEquals(-1L, revision.getNumber());
        assertNull(revision.getDate());
    }
View Full Code Here

        assertEquals(-1L, revision.getNumber());
        assertNull(revision.getDate());
    }

    private WorkspaceUpdater.UpdateTask createUpdateTask() {
         UpdateTask updateTask = new WorkspaceUpdater.UpdateTask() {
            private static final long serialVersionUID = 1L;
            @Override
            public List<External> perform() throws IOException, InterruptedException {
                return null;
            }
View Full Code Here

TOP

Related Classes of hudson.scm.subversion.WorkspaceUpdater.UpdateTask

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.