@Test public void testQueryByRoleCodes_假如存在角色ADMIN_当传入ADMIN时_那么可以获取到角色拥有的资源集合() { Set<Resource> resources = resourceService.queryByRoleCodes(new String[]{"ADMIN"}); Assert.assertThat(resources.size(), greaterThan(2)); }
@Override public Set<Resource> queryByRoleCodes(String[] roleCodes) { return resourceMapper.queryByRoleCodes(roleCodes); }
ResourceService implements IResourceService { @Override public Set<Resource> queryByRoleCodes(String[] roleCodes) { return resourceMapper.queryByRoleCodes(roleCodes); } }
ResourceService implements IResourceService { @Override public Set<Resource> queryByRoleCodes(String[] roleCodes) { return resourceMapper.queryByRoleCodes(roleCodes); }  }
ResourceService implements IResourceService { @Override public Set<Resource> queryByRoleCodes(String[] roleCodes) { return resourceMapper.queryByRoleCodes(roleCodes); }  @Override Set<Resource> findAll(); @Override Set<Resource> queryByRoleCodes(String[] roleCodes); }
ResourceService implements IResourceService { @Override public Set<Resource> queryByRoleCodes(String[] roleCodes) { return resourceMapper.queryByRoleCodes(roleCodes); }  @Override Set<Resource> findAll(); @Override Set<Resource> queryByRoleCodes(String[] roleCodes);  }