@Test public void api() throws Exception { MatrixProject project = j.createMatrixProject(); project.setAxes(new AxisList(new Axis("FOO", "abc", "def"), new Axis("BAR", "uvw", "xyz"))); XmlPage xml = j.createWebClient().goToXml(project.getUrl() + "api/xml"); assertEquals(4, xml.getByXPath("//matrixProject/activeConfiguration").size()); }
/** Test that spaces are encoded as %20 for project name, axis name and axis value. */ @Test public void spaceInUrl() { MatrixProject mp = new MatrixProject("matrix test"); MatrixConfiguration mc = new MatrixConfiguration(mp, Combination.fromString("foo bar=baz bat")); assertEquals("job/matrix%20test/", mp.getUrl()); assertEquals("job/matrix%20test/foo%20bar=baz%20bat/", mc.getUrl()); }