source: src/test/java/negotiator/AgentIdTest.java@ 127

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
Line 
1package negotiator;
2
3import static org.junit.Assert.assertEquals;
4
5import java.util.Arrays;
6import java.util.Collection;
7
8import org.junit.Test;
9import org.junit.runner.RunWith;
10import org.junit.runners.Parameterized;
11import org.junit.runners.Parameterized.Parameters;
12
13import genius.core.AgentID;
14
15@RunWith(Parameterized.class)
16public 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.