Skip to main content
summaryrefslogtreecommitdiffstats
blob: 46f82c339639661e26c1698fd833c7ea4bc7b177 (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
/*******************************************************************************
 * 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.mylyn.trac.tests;

import junit.framework.TestCase;

import org.eclipse.mylyn.internal.trac.core.ITracClient;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
import org.eclipse.mylyn.internal.trac.core.model.TracSearch;

/**
 * @author Steffen Pingel
 */
public class TracQueryTest extends TestCase {

	private TracRepositoryQuery createQuery(String parameter) {
		String url = "http://oss.steffenpingel.de/mylar-trac-connector";
		return new TracRepositoryQuery(url, url + ITracClient.QUERY_URL + parameter, "description");
	}

	public void testGetTracSearch() {
		String queryParameter = "&order=priority&status=new&status=assigned&status=reopened&milestone=M1&owner=%7E%C3%A4%C3%B6%C3%BC";
		TracRepositoryQuery query = createQuery(queryParameter);
		TracSearch search = query.getTracSearch();
		assertEquals(queryParameter, search.toUrl());
	}

}

Back to the top