Skip to content

Commit

Permalink
Add test namespaceWithSpaceAtEndWorks
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Sep 7, 2017
1 parent e96d1be commit 482e82a
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
* distribution, and are available at http://www.eclipse.org/legal/epl-v10.html and
* http://www.apache.org/licenses/LICENSE-2.0
*
* Contributors: Lukas Harzenetter - initial API and implementation
* Contributors:
* - Lukas Harzenetter - initial API and implementation
* - Oliver Kopp - test for namespaceWithSpaceAtEndWorks
*/
package org.eclipse.winery.repository.backend.filebased;

import java.util.SortedSet;

import org.eclipse.winery.common.ids.definitions.NodeTypeId;
import org.eclipse.winery.common.ids.definitions.imports.XSDImportId;
import org.eclipse.winery.repository.TestWithGitBackedRepository;

Expand All @@ -22,7 +25,16 @@ public class FilebasedRepositoryTest extends TestWithGitBackedRepository {
public void getAllTOSCAComponentIds() throws Exception {
this.setRevisionTo("5fdcffa9ccd17743d5498cab0914081fc33606e9");
SortedSet<XSDImportId> allImports = this.repository.getAllTOSCAComponentIds(XSDImportId.class);

Assert.assertEquals(1, allImports.size());
}

@Test
public void namespaceWithSpaceAtEndWorks() throws Exception {
this.setRevisionTo("5fdcffa9ccd17743d5498cab0914081fc33606e9");
NodeTypeId id = new NodeTypeId("http://www.example.org ", "id", false);
Assert.assertFalse(this.repository.exists(id));
this.repository.flagAsExisting(id);
Assert.assertTrue(this.repository.exists(id));
Assert.assertNotNull(this.repository.getElement(id));
}
}

0 comments on commit 482e82a

Please sign in to comment.