- final List<Api> apis = mountPointApi.getApis();
- assertEquals("Unexpected api list size", 3, apis.size());
-
- final Set<String> actualApis = new TreeSet<>();
- for (final Api api : apis) {
- actualApis.add(api.getPath());
- final List<Operation> operations = api.getOperations();
- assertEquals("unexpected operation size on " + api.getPath(), 1, operations.size());
- assertEquals("unexpected operation method " + api.getPath(), "GET", operations.get(0)
- .getMethod());
- assertNotNull("expected non-null desc on " + api.getPath(), operations.get(0)
- .getNotes());
- }
- final Set<String> expectedApis = new TreeSet<>(Arrays.asList(new String[] {
- "/config/" + INSTANCE_URL + "yang-ext:mount/",
- "/operational/" + INSTANCE_URL + "yang-ext:mount/",
- "/operations/" + INSTANCE_URL + "yang-ext:mount/", }));
- assertEquals(expectedApis, actualApis);
- }