blob: c9d00532a4b61b82d27ee685b08d10dc8eaa50e1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*******************************************************************************
* Copyright (c) 2006 - 2006 Mylar eclipse.org project and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mylar project committers - initial API and implementation
*******************************************************************************/
package org.eclipse.mylar.trac.tests;
import java.util.Arrays;
import java.util.Comparator;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.mylar.internal.trac.core.ITracClient.Version;
import org.eclipse.mylar.internal.trac.model.TracVersion;
/**
* @author Steffen Pingel
*/
public class Trac09ClientTest extends AbstractTracClientRepositoryTest {
public Trac09ClientTest() {
super(Version.TRAC_0_9);
}
public void testValidate096() throws Exception {
connect096();
validate();
}
public void testValidateAnonymousLogin() throws Exception {
connect(Constants.TEST_REPOSITORY1_URL, "", "");
repository.validate();
}
public void testUpdateAttributes() throws Exception {
connect010();
assertNull(repository.getMilestones());
repository.updateAttributes(new NullProgressMonitor());
TracVersion[] versions = repository.getVersions();
assertEquals(2, versions.length);
Arrays.sort(versions, new Comparator<TracVersion>() {
public int compare(TracVersion o1, TracVersion o2) {
return o1.getName().compareTo(o2.getName());
}
});
assertEquals("v1", versions[0].getName());
assertEquals("v2", versions[1].getName());
}
}
|