@Test public void should_get_uri_from_src_test_or_main_resources() { final URI resources = DockerContainerDefinitionParser.checkSrcTestAndMainResources("simple-docker-compose", "resources"); assertThat(resources).isNotNull(); }
static URI checkSrcTestAndMainResources(String filename, String outerDirectory) { final Path testPath = Paths.get("src", "test", outerDirectory, filename); final Path testDefinitionPath = resolveDockerDefinition(testPath); if (testDefinitionPath != null) { return testDefinitionPath.toUri(); } else { final Path mainPath = Paths.get("src", "main", outerDirectory, filename); final Path mainDefinitionPath = resolveDockerDefinition(mainPath); if (mainDefinitionPath != null) { return mainDefinitionPath.toUri(); } } return null; }
DockerContainerDefinitionParser { static URI checkSrcTestAndMainResources(String filename, String outerDirectory) { final Path testPath = Paths.get("src", "test", outerDirectory, filename); final Path testDefinitionPath = resolveDockerDefinition(testPath); if (testDefinitionPath != null) { return testDefinitionPath.toUri(); } else { final Path mainPath = Paths.get("src", "main", outerDirectory, filename); final Path mainDefinitionPath = resolveDockerDefinition(mainPath); if (mainDefinitionPath != null) { return mainDefinitionPath.toUri(); } } return null; } }
DockerContainerDefinitionParser { static URI checkSrcTestAndMainResources(String filename, String outerDirectory) { final Path testPath = Paths.get("src", "test", outerDirectory, filename); final Path testDefinitionPath = resolveDockerDefinition(testPath); if (testDefinitionPath != null) { return testDefinitionPath.toUri(); } else { final Path mainPath = Paths.get("src", "main", outerDirectory, filename); final Path mainDefinitionPath = resolveDockerDefinition(mainPath); if (mainDefinitionPath != null) { return mainDefinitionPath.toUri(); } } return null; } private  DockerContainerDefinitionParser(); }
DockerContainerDefinitionParser { static URI checkSrcTestAndMainResources(String filename, String outerDirectory) { final Path testPath = Paths.get("src", "test", outerDirectory, filename); final Path testDefinitionPath = resolveDockerDefinition(testPath); if (testDefinitionPath != null) { return testDefinitionPath.toUri(); } else { final Path mainPath = Paths.get("src", "main", outerDirectory, filename); final Path mainDefinitionPath = resolveDockerDefinition(mainPath); if (mainDefinitionPath != null) { return mainDefinitionPath.toUri(); } } return null; } private  DockerContainerDefinitionParser(); static DockerCompositions convert(Path definitionFilePath, DefinitionFormat definitionFormat); static DockerCompositions convert(DefinitionFormat definitionFormat, URI... uris); static DockerCompositions convert(String content, DefinitionFormat definitionFormat); static DockerCompositions convertDefault(DefinitionFormat definitionFormat); }
DockerContainerDefinitionParser { static URI checkSrcTestAndMainResources(String filename, String outerDirectory) { final Path testPath = Paths.get("src", "test", outerDirectory, filename); final Path testDefinitionPath = resolveDockerDefinition(testPath); if (testDefinitionPath != null) { return testDefinitionPath.toUri(); } else { final Path mainPath = Paths.get("src", "main", outerDirectory, filename); final Path mainDefinitionPath = resolveDockerDefinition(mainPath); if (mainDefinitionPath != null) { return mainDefinitionPath.toUri(); } } return null; } private  DockerContainerDefinitionParser(); static DockerCompositions convert(Path definitionFilePath, DefinitionFormat definitionFormat); static DockerCompositions convert(DefinitionFormat definitionFormat, URI... uris); static DockerCompositions convert(String content, DefinitionFormat definitionFormat); static DockerCompositions convertDefault(DefinitionFormat definitionFormat);  }