Last change
on this file since 127 was 1, checked in by Wouter Pasman, 6 years ago |
Initial import : Genius 9.0.0
|
File size:
803 bytes
|
Rev | Line | |
---|
[1] | 1 | package negotiator;
|
---|
| 2 |
|
---|
| 3 | import static org.junit.Assert.assertEquals;
|
---|
| 4 |
|
---|
| 5 | import java.util.Arrays;
|
---|
| 6 | import java.util.Collection;
|
---|
| 7 |
|
---|
| 8 | import org.junit.Test;
|
---|
| 9 | import org.junit.runner.RunWith;
|
---|
| 10 | import org.junit.runners.Parameterized;
|
---|
| 11 | import org.junit.runners.Parameterized.Parameters;
|
---|
| 12 |
|
---|
| 13 | import genius.core.AgentID;
|
---|
| 14 |
|
---|
| 15 | @RunWith(Parameterized.class)
|
---|
| 16 | public class AgentIdTest {
|
---|
| 17 | @Parameters
|
---|
| 18 | public static Collection<Object[]> data() {
|
---|
| 19 | return Arrays.asList(new Object[][] { { "Agent@1", "Agent" }, { "Agent@library", "Agent@library" },
|
---|
| 20 | { "Agent@1@2", "Agent@1" } });
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | private String input;
|
---|
| 24 | private String expected;
|
---|
| 25 |
|
---|
| 26 | public AgentIdTest(String input, String expected) {
|
---|
| 27 | this.input = input;
|
---|
| 28 | this.expected = expected;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | @Test
|
---|
| 32 | public void test1() {
|
---|
| 33 | assertEquals(expected, new AgentID(input).getName());
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.