blob: e5c92970b987b4c2333d6e04fbc1b80c6ccb94ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package org.javacs;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import org.junit.Test;
public class ArtifactTest {
@Test
public void parseShort() {
assertThat(Artifact.parse("foo:bar:1"), equalTo(new Artifact("foo", "bar", "1")));
}
@Test
public void parseLong() {
assertThat(Artifact.parse("foo:bar:jar:1:compile"), equalTo(new Artifact("foo", "bar", "1")));
}
@Test(expected = IllegalArgumentException.class)
public void parseIllegal() {
Artifact.parse("bad");
}
}
|