@Test public void testFindPathSpec() throws JSONException { DevicePluginContext pluginContext = Mockito.mock(DevicePluginContext.class); String jsonString = FileLoader.readString("testProfile.json"); DConnectServiceSpec spec = new DConnectServiceSpec(pluginContext); spec.addProfileSpec("testProfile", jsonString); Path path = spec.findPathSpec("/gotapi/testProfile"); assertThat(path, is(notNullValue())); }
public Path findPathSpec(String path) { Swagger swagger = findProfileSpec(findProfileFromPath(path)); if (swagger != null) { return findPathSpec(swagger, path); } return null; }
DConnectServiceSpec { public Path findPathSpec(String path) { Swagger swagger = findProfileSpec(findProfileFromPath(path)); if (swagger != null) { return findPathSpec(swagger, path); } return null; } }
DConnectServiceSpec { public Path findPathSpec(String path) { Swagger swagger = findProfileSpec(findProfileFromPath(path)); if (swagger != null) { return findPathSpec(swagger, path); } return null; } DConnectServiceSpec(DevicePluginContext pluginContext); }
DConnectServiceSpec { public Path findPathSpec(String path) { Swagger swagger = findProfileSpec(findProfileFromPath(path)); if (swagger != null) { return findPathSpec(swagger, path); } return null; } DConnectServiceSpec(DevicePluginContext pluginContext); Map<String, Swagger> getProfileSpecs(); void addProfileSpec(final String profileName); void addProfileSpec(final String profileName, final String jsonString); Swagger removeProfileSpec(final String profileName); Swagger findProfileSpec(final String profileName); Path findPathSpec(String path); Path findPathSpec(Intent request); Operation findOperationSpec(Method method, String path); Operation findOperationSpec(Method method, String profileName, String attributeName); Operation findOperationSpec(Method method, String profileName, String interfaceName, String attributeName); Operation findOperationSpec(Method method, String apiName, String profileName, String interfaceName, String attributeName); Operation findOperationSpec(Intent request); }
DConnectServiceSpec { public Path findPathSpec(String path) { Swagger swagger = findProfileSpec(findProfileFromPath(path)); if (swagger != null) { return findPathSpec(swagger, path); } return null; } DConnectServiceSpec(DevicePluginContext pluginContext); Map<String, Swagger> getProfileSpecs(); void addProfileSpec(final String profileName); void addProfileSpec(final String profileName, final String jsonString); Swagger removeProfileSpec(final String profileName); Swagger findProfileSpec(final String profileName); Path findPathSpec(String path); Path findPathSpec(Intent request); Operation findOperationSpec(Method method, String path); Operation findOperationSpec(Method method, String profileName, String attributeName); Operation findOperationSpec(Method method, String profileName, String interfaceName, String attributeName); Operation findOperationSpec(Method method, String apiName, String profileName, String interfaceName, String attributeName); Operation findOperationSpec(Intent request);  }