ResourceHandlerTest.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:keti 作者:
@Test
public void testUriVariablePositive() {
    HashSet<Attribute> attributes = new HashSet<Attribute>(
            Arrays.asList(new Attribute("acs", "site", "boston"), new Attribute("acs", "department", "sales")));
    ResourceHandler handler = new ResourceHandler(attributes,
            "http://assets.predix.io/site/boston/department/sales", "site/{site_id}/department/{department_id}");
    Assert.assertEquals("boston", handler.uriVariable("site_id"));
    Assert.assertEquals("sales", handler.uriVariable("department_id"));
    Assert.assertNotEquals("hr", handler.uriVariable("department_id"));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号