summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorHenrik <henrik.hoiness@online.no>2018-07-06 15:37:22 +0200
committerHenrik <henrik.hoiness@online.no>2018-07-06 15:37:22 +0200
commite3d200c2f2bb004a808ea82d03d3f4f496469607 (patch)
tree6b7f69a8e20b30492fec773db2896e157511f1d5 /controller-server
parent1c604359c6a432685b6edbb3e721aa9af91a518e (diff)
Added Copyrigths and changes a few things for ids on HTMLElements
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/PathTest.java63
1 files changed, 0 insertions, 63 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/PathTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/PathTest.java
deleted file mode 100644
index b1a3040521f..00000000000
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/PathTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.controller.restapi.application;
-
-import com.yahoo.restapi.Path;
-import org.junit.Test;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-
-/**
- * @author bratseth
- */
-public class PathTest {
-
- @Test
- public void testPath() {
- assertFalse(new Path("").matches("/a/{foo}/bar/{b}"));
- assertFalse(new Path("///").matches("/a/{foo}/bar/{b}"));
- assertFalse(new Path("///foo").matches("/a/{foo}/bar/{b}"));
- assertFalse(new Path("///bar/").matches("/a/{foo}/bar/{b}"));
- Path path = new Path("/a/1/bar/fuz");
- assertTrue(path.matches("/a/{foo}/bar/{b}"));
- assertEquals("1", path.get("foo"));
- assertEquals("fuz", path.get("b"));
- }
-
- @Test
- public void testPathWithRest() {
- {
- Path path = new Path("/a/1/bar/fuz/");
- assertTrue(path.matches("/a/{foo}/bar/{b}/{*}"));
- assertEquals("1", path.get("foo"));
- assertEquals("fuz", path.get("b"));
- assertEquals("", path.getRest());
- }
-
- {
- Path path = new Path("/a/1/bar/fuz/kanoo");
- assertTrue(path.matches("/a/{foo}/bar/{b}/{*}"));
- assertEquals("1", path.get("foo"));
- assertEquals("fuz", path.get("b"));
- assertEquals("kanoo", path.getRest());
- }
-
- {
- Path path = new Path("/a/1/bar/fuz/kanoo/trips");
- assertTrue(path.matches("/a/{foo}/bar/{b}/{*}"));
- assertEquals("1", path.get("foo"));
- assertEquals("fuz", path.get("b"));
- assertEquals("kanoo/trips", path.getRest());
- }
-
- {
- Path path = new Path("/a/1/bar/fuz/kanoo/trips/");
- assertTrue(path.matches("/a/{foo}/bar/{b}/{*}"));
- assertEquals("1", path.get("foo"));
- assertEquals("fuz", path.get("b"));
- assertEquals("kanoo/trips/", path.getRest());
- }
- }
-
-}