Skip to content

Commit

Permalink
[tests] Resource IDs are platform-dependent.
Browse files Browse the repository at this point in the history
see #580

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Feb 14, 2017
1 parent 53676ad commit 71d05e9
Showing 1 changed file with 16 additions and 8 deletions.
Expand Up @@ -330,21 +330,25 @@ public void validateTypeOfVarArgInSarl() throws Exception {
@Test
public void createQualifiedActionName() {
JvmIdentifiableElement container = createJvmIdentifiableElementStub();
final String xtextResourceID = container.eResource().getURI().toString();
QualifiedActionName qn = this.provider.createQualifiedActionName(container, "myfct");
assertNotNull(qn);
assertEquals("myfct", qn.getActionName());
assertEquals("file:/path/to/io/sarl/tests/Stub"+index+".sarl/io.sarl.tests.Stub"+index, qn.getContainerID());
assertEquals("file:/path/to/io/sarl/tests/Stub"+index+".sarl/io.sarl.tests.Stub"+index+"#myfct", qn.toString());
// xtextResourceID == "file:/path/to/io/sarl/tests/Stub"+index+".sarl"
assertEquals(xtextResourceID + "/io.sarl.tests.Stub"+index, qn.getContainerID());
assertEquals(xtextResourceID + "/io.sarl.tests.Stub"+index+"#myfct", qn.toString());
}

@Test
public void createConstructorQualifiedName() {
JvmIdentifiableElement container = createJvmIdentifiableElementStub();
final String xtextResourceID = container.eResource().getURI().toString();
QualifiedActionName qn = this.provider.createConstructorQualifiedName(container);
assertNotNull(qn);
assertEquals("new", qn.getActionName());
assertEquals("file:/path/to/io/sarl/tests/Stub"+index+".sarl/io.sarl.tests.Stub"+index, qn.getContainerID());
assertEquals("file:/path/to/io/sarl/tests/Stub"+index+".sarl/io.sarl.tests.Stub"+index+"#new", qn.toString());
// xtextResourceID == "file:/path/to/io/sarl/tests/Stub"+index+".sarl"
assertEquals(xtextResourceID + "/io.sarl.tests.Stub"+index, qn.getContainerID());
assertEquals(xtextResourceID + "/io.sarl.tests.Stub"+index+"#new", qn.toString());
}

@Test
Expand Down Expand Up @@ -988,21 +992,25 @@ public void validateTypeOfVarArgInSarl() throws Exception {
@Test
public void createQualifiedActionName() {
JvmIdentifiableElement container = createJvmIdentifiableElementStub();
final String xtextResourceID = container.eResource().getURI().toString();
QualifiedActionName qn = this.provider.createQualifiedActionName(container, "myfct");
assertNotNull(qn);
assertEquals("myfct", qn.getActionName());
assertEquals("file:/path/to/io/sarl/tests/Stub"+index+".sarl/io.sarl.tests.Stub"+index, qn.getContainerID());
assertEquals("file:/path/to/io/sarl/tests/Stub"+index+".sarl/io.sarl.tests.Stub"+index+"#myfct", qn.toString());
//xtextResourceID == "file:/path/to/io/sarl/tests/Stub"+index+".sarl"
assertEquals(xtextResourceID + "/io.sarl.tests.Stub"+index, qn.getContainerID());
assertEquals(xtextResourceID + "/io.sarl.tests.Stub"+index+"#myfct", qn.toString());
}

@Test
public void createConstructorQualifiedName() {
JvmIdentifiableElement container = createJvmIdentifiableElementStub();
final String xtextResourceID = container.eResource().getURI().toString();
QualifiedActionName qn = this.provider.createConstructorQualifiedName(container);
assertNotNull(qn);
assertEquals("new", qn.getActionName());
assertEquals("file:/path/to/io/sarl/tests/Stub"+index+".sarl/io.sarl.tests.Stub"+index, qn.getContainerID());
assertEquals("file:/path/to/io/sarl/tests/Stub"+index+".sarl/io.sarl.tests.Stub"+index+"#new", qn.toString());
//xtextResourceID == "file:/path/to/io/sarl/tests/Stub"+index+".sarl"
assertEquals(xtextResourceID + "/io.sarl.tests.Stub"+index, qn.getContainerID());
assertEquals(xtextResourceID + "/io.sarl.tests.Stub"+index+"#new", qn.toString());
}

@Test
Expand Down

0 comments on commit 71d05e9

Please sign in to comment.