id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
25573964_123
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test\n public void shouldDestroyWithCubeID() {\n controllerInst.get().destroy(new CubeID(CUBE_ID));\n assertEventFired(DestroyCube.class, 1);\n }", "class_method_signature": "ClientCubeControllerTest.shouldDestroyWithCubeID()", "constructor": false, "full_signature": "@Test publi...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void destroy(CubeID cubeId) {\n destroy(cubeId.get());\n }", "class_method_signature": "ClientCubeController.destroy(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void destroy(CubeID cubeId)", "identifier": "destroy", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_55
{ "fields": [ { "declarator": "ID = \"test\"", "modifier": "private static final", "original_string": "private static final String ID = \"test\";", "type": "String", "var_name": "ID" }, { "declarator": "executor", "modifier": "@Mock\n private", "original_...
{ "body": "@Test\n public void shouldFireLifecycleEventsDuringStart() {\n cube.start();\n assertEventFired(BeforeStart.class, 1);\n assertEventFired(AfterStart.class, 1);\n }", "class_method_signature": "DockerCubeTest.shouldFireLifecycleEventsDuringStart()", "constructor": false, "fu...
{ "fields": [ { "declarator": "log = Logger.getLogger(DockerCube.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(DockerCube.class.getName());", "type": "Logger", "var_name": "log" }, { "declar...
{ "body": "@Override\n public void start() throws CubeControlException {\n if (state == State.STARTED || state == State.PRE_RUNNING) {\n return;\n }\n try {\n lifecycle.fire(new BeforeStart(id));\n\n long currentTime = System.currentTimeMillis();\n e...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_135
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "file": "co...
{ "body": "@Test\n public void shouldDownloadFileIfExpired() throws IOException, InterruptedException {\n final File newFolder = temporaryFolder.newFolder();\n final Path path = Paths.get(newFolder.getAbsolutePath(), \"arquillian_crown_icon_glossy_256.png\");\n Files.write(path, \"invalidchunk...
{ "fields": [ { "declarator": "TEMP_LOCATION = System.getProperty(\"java.io.tmpdir\")", "modifier": "static", "original_string": "static String TEMP_LOCATION = System.getProperty(\"java.io.tmpdir\");", "type": "String", "var_name": "TEMP_LOCATION" }, { "declarator": "ex...
{ "body": "@Override\n public InputStream openStream() {\n final URL source = this.getSource();\n String fileName = getFileName(source);\n\n File file = new File(TEMP_LOCATION, fileName);\n try {\n if (!file.exists() || !file.isFile() || isExpired(file)) {\n In...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_43
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "file": "do...
{ "body": "@Test\n public void shouldStopSpinningIfRunningInsideDocker() throws IOException {\n temporaryFolder.newFile(Top.DOCKER_SOCK);\n temporaryFolder.newFile(Top.DOCKERENV);\n temporaryFolder.newFile(Top.DOCKERINIT);\n Top top = new Top(temporaryFolder.getRoot().getAbsolutePath(),...
{ "fields": [ { "declarator": "DOCKER_SOCK = \"docker.sock\"", "modifier": "static final", "original_string": "static final String DOCKER_SOCK = \"docker.sock\";", "type": "String", "var_name": "DOCKER_SOCK" }, { "declarator": "DOCKERINIT = \".dockerinit\"", "modi...
{ "body": "public boolean isSpinning() {\n return dockerEnvPath.exists() && dockerInitPath.exists() && dockerSocketFile.exists();\n }", "class_method_signature": "Top.isSpinning()", "constructor": false, "full_signature": "public boolean isSpinning()", "identifier": "isSpinning", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_14
{ "fields": [], "file": "kubernetes/kubernetes/src/test/java/org/arquillian/cube/kubernetes/impl/utils/FileUtilsTest.java", "identifier": "FileUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_get_file_name_without_extension() {\n final String resource = resourceName(Paths.get(\"foo/bar/hello.yml\"));\n\n Assertions.assertThat(resource).isEqualTo(\"hello\");\n }", "class_method_signature": "FileUtilsTest.should_get_file_name_without_extension()", ...
{ "fields": [], "file": "kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/utils/FileUtils.java", "identifier": "FileUtils", "interfaces": "", "methods": [ { "class_method_signature": "FileUtils.isResourceAllowed(Path path, String[] resourceNames, String[] resourceSuffixes)", ...
{ "body": "static String resourceName(Path path) {\n final String name = fileName(path);\n\n return name.substring(0, name.lastIndexOf(\".\"));\n }", "class_method_signature": "FileUtils.resourceName(Path path)", "constructor": false, "full_signature": "static String resourceName(Path path)", ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_63
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "@Mock", "original_string": "@Mock\n CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" } ], "file": "docker/docker/src/test/java/org/arquillian/cube/d...
{ "body": "@Test\n public void testDockerMachineRequirementCheckNoMatchingNameMatched() throws Exception {\n when(commandLineExecutor.execCommandAsArray(anyVararg())).thenReturn(Arrays.asList(new String[] {\"testing\"}));\n\n DockerMachineRequirement dockerMachineRequirement = new DockerMachineRequir...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" } ], "file": "docker/docker/src/main/java/org/arquil...
{ "body": "@Override\n public void check(RequiresDockerMachine context) throws UnsatisfiedRequirementException {\n String name = context.name();\n try {\n if (name != null && !name.isEmpty()) {\n List<String> machines =\n commandLineExecutor.execCommandAsA...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_115
{ "fields": [ { "declarator": "restoreSystemProperties = new RestoreSystemProperties()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();", "type": "RestoreSystemProperties", ...
{ "body": "@Test\n public void should_overwrite_system_property_if_property_present_in_config_map() {\n // given\n System.setProperty(\"app.name\", \"systemProperty\");\n\n final EnricherExpressionResolver resolver =\n new EnricherExpressionResolver(ConfigurationParameters.from(\"ap...
{ "fields": [ { "declarator": "configurationParameters", "modifier": "private", "original_string": "private ConfigurationParameters configurationParameters;", "type": "ConfigurationParameters", "var_name": "configurationParameters" } ], "file": "core/src/main/java/org/arquill...
{ "body": "public String resolve(String property) {\n final String replacedProperties = StringPropertyReplacer.replaceProperties(property);\n if (!property.equals(replacedProperties)) {\n return replacedProperties;\n } else {\n final Map<String, String> configParams = config...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_34
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/SinglePortBindResolverTest.java", "identifier": "SinglePortBindResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_resolve_two_bind_port_from_different_containers_with_exposed_port() {\n String content =\n \"tomcat:\\n\" +\n \" image: tutum/tomcat:8.0\\n\" +\n \" portBindings: [8080/tcp]\\n\" +\n \" links:\\n\" +\n ...
{ "fields": [ { "declarator": "NO_PORT = -1", "modifier": "private static final", "original_string": "private static final int NO_PORT = -1;", "type": "int", "var_name": "NO_PORT" } ], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/SinglePortBindRes...
{ "body": "public static int resolveBindPort(CubeDockerConfiguration cubeDockerConfiguration, int exposedPort,\n String... excludedContainers) {\n final PortBindInfo portBinding = resolvePortBindPort(cubeDockerConfiguration, exposedPort, excludedContainers);\n\n if (portBinding == null) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_22
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" }, { "decl...
{ "body": "@Test\n public void should_start_vnc_by_default() {\n when(seleniumContainers.getVncContainerName()).thenReturn(\"vnc\");\n when(cubeRegistry.getCube(\"vnc\")).thenReturn(cube);\n\n VncRecorderLifecycleManager vncRecorderLifecycleManager = new VncRecorderLifecycleManager();\n\n ...
{ "fields": [ { "declarator": "afterVideoRecordedEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<AfterVideoRecorded> afterVideoRecordedEvent;", "type": "Event<AfterVideoRecorded>", "var_name": "afterVideoRecordedEvent" }, { "declarator": "seleniumC...
{ "body": "public void startRecording(@Observes Before beforeTestMethod, CubeDroneConfiguration cubeDroneConfiguration,\n CubeRegistry cubeRegistry) {\n\n try {\n if (cubeDroneConfiguration.isRecording()) {\n\n // lazy init\n initVncCube(cubeRegistry);\n\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_8
{ "fields": [ { "declarator": "istioClient", "modifier": "@Mock\n private", "original_string": "@Mock\n private IstioClient istioClient;", "type": "IstioClient", "var_name": "istioClient" }, { "declarator": "istioResource", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void should_load_all_routes_from_classpath() {\n\n // given\n final IstioAssistant istioAssistant = new IstioAssistant((istioClient));\n\n // when\n final List<IstioResource> istioResources =\n istioAssistant.deployIstioResourcesFromClasspathPattern(...
{ "fields": [ { "declarator": "istioClient", "modifier": "private final", "original_string": "private final IstioClient istioClient;", "type": "IstioClient", "var_name": "istioClient" }, { "declarator": "httpClient", "modifier": "private final", "original_st...
{ "body": "public List<IstioResource> deployIstioResourcesFromClasspathPattern(String pattern) {\n\n final List<IstioResource> istioResources = new ArrayList<>();\n final FastClasspathScanner fastClasspathScanner = new FastClasspathScanner();\n\n fastClasspathScanner.matchFilenamePattern(pattern,...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_75
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Mock", "original_string": "@Mock\n CubeRegistry cubeRegistry;", "type": "CubeRegistry", "var_name": "cubeRegistry" }, { "declarator": "dockerCube", "modifier": "@Mock", "original_string": "@Mock\...
{ "body": "@Test\n public void should_set_cube_properties() {\n\n // given\n SystemPropertiesCubeSetter systemPropertiesCubeSetter = new SystemPropertiesCubeSetter();\n\n // when\n systemPropertiesCubeSetter.createCubeSystemProperties(new AfterStart(\"image\"), cubeRegistry);\n\n ...
{ "fields": [ { "declarator": "PREFIX = \"arq.cube.docker\"", "modifier": "private static final", "original_string": "private static final String PREFIX = \"arq.cube.docker\";", "type": "String", "var_name": "PREFIX" } ], "file": "docker/docker/src/main/java/org/arquillian/cu...
{ "body": "public void createCubeSystemProperties(@Observes AfterStart afterStart, CubeRegistry cubeRegistry) {\n String cubeId = afterStart.getCubeId();\n\n final DockerCube cube = cubeRegistry.getCube(cubeId, DockerCube.class);\n\n final Binding bindings = cube.bindings();\n final String...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_103
{ "fields": [ { "declarator": "SIMPLE_SCENARIO =\n \"helloworld:\\n\" +\n \" image: dockercloud/hello-world\\n\" +\n \" portBindings: [8080->80/tcp]\"", "modifier": "private static final", "original_string": "private static final String SIMPLE_SCENARIO =\n \...
{ "body": "@Test\n public void should_resolve_exposed_port() {\n RestAssuredCustomizer restAssuredCustomizer = new RestAssuredCustomizer();\n\n Map<String, String> conf = new HashMap<>();\n conf.put(\"baseUri\", \"http://localhost\");\n conf.put(\"port\", \"80\");\n\n final RestA...
{ "fields": [ { "declarator": "cubeDockerConfigurationInstance", "modifier": "@Inject", "original_string": "@Inject\n Instance<CubeDockerConfiguration> cubeDockerConfigurationInstance;", "type": "Instance<CubeDockerConfiguration>", "var_name": "cubeDockerConfigurationInstance" ...
{ "body": "void configureRequestSpecBuilder(@Observes RestAssuredConfiguration restAssuredConfiguration,\n CubeDockerConfiguration cubeDockerConfiguration, RequestSpecBuilder requestSpecBuilder) {\n if (restAssuredConfiguration.isBaseUriSet()) {\n requestSpecBuilder.setBaseUri(restAssuredConf...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_59
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "@Mock", "original_string": "@Mock\n CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" } ], "file": "docker/docker/src/test/java/org/arquillian/cube/d...
{ "body": "@Test(expected = UnsatisfiedRequirementException.class)\n public void estDockerMachineRequirementCheckWhenExecutionExceptionThrown() throws UnsatisfiedRequirementException {\n when(commandLineExecutor.execCommandAsArray(anyVararg())).thenThrow(ExecutionException.class);\n\n DockerMachineRe...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" } ], "file": "docker/docker/src/main/java/org/arquil...
{ "body": "@Override\n public void check(RequiresDockerMachine context) throws UnsatisfiedRequirementException {\n String name = context.name();\n try {\n if (name != null && !name.isEmpty()) {\n List<String> machines =\n commandLineExecutor.execCommandAsA...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_18
{ "fields": [ { "declarator": "server = new KubernetesMockServer()", "modifier": "private static final", "original_string": "private static final KubernetesMockServer server = new KubernetesMockServer();", "type": "KubernetesMockServer", "var_name": "server" }, { "decla...
{ "body": "@Test\n public void should_report_environment_dependencies_from_http_url_and_configuration_from_default_location()\n throws IOException {\n //given\n String resourceName = SERVICE_PATH + \",\" + REPLICATION_CONTROLLER_PATH;\n Configuration configuration = DefaultConfiguration...
{ "fields": [ { "declarator": "sectionEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<SectionEvent> sectionEvent;", "type": "Event<SectionEvent>", "var_name": "sectionEvent" }, { "declarator": "dependencyResolver", "modifier": "@Inject", ...
{ "body": "public void reportKubernetesConfiguration(@Observes Start start, Configuration configuration,\n org.arquillian.reporter.config.ReporterConfiguration reporterConfiguration) throws IOException {\n final ReportBuilder reportBuilder = Reporter.createReport(CONFIGURATION);\n Session session...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_13
{ "fields": [], "file": "kubernetes/kubernetes/src/test/java/org/arquillian/cube/kubernetes/impl/DefaultConfigurationTest.java", "identifier": "DefaultConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldParseNormalMap() throws Exception {\n String s = \"KEY1=VALUE1\\n\" +\n \"KEY_TWO=VALUE2\\n\" +\n \"KEY3=VALUE3\\n\" +\n \"key4=VALUE4\\n\" +\n \"KEY_5=VALUE5\";\n\n Map<String, String> result = DefaultConfiguration.parseMap(s);\n ...
{ "fields": [ { "declarator": "ENV_VAR_REGEX = \"env.([a-zA-Z0-9_]+)\"", "modifier": "private static final", "original_string": "private static final String ENV_VAR_REGEX = \"env.([a-zA-Z0-9_]+)\";", "type": "String", "var_name": "ENV_VAR_REGEX" }, { "declarator": "ENV_...
{ "body": "public static Map<String, String> parseMap(String s) throws IOException {\n if (Strings.isNullOrEmpty(s)) {\n return Collections.EMPTY_MAP;\n }\n\n Properties properties = new Properties();\n try (InputStream is = new ByteArrayInputStream(s.getBytes(Charset.defaultCha...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_44
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "file": "do...
{ "body": "@Test\n public void shouldNotStopSpinningIfRunningInsideDocker() throws IOException {\n temporaryFolder.newFile(Top.DOCKERENV);\n temporaryFolder.newFile(Top.DOCKERINIT);\n Top top = new Top(temporaryFolder.getRoot().getAbsolutePath(), temporaryFolder.getRoot().getAbsolutePath());\n...
{ "fields": [ { "declarator": "DOCKER_SOCK = \"docker.sock\"", "modifier": "static final", "original_string": "static final String DOCKER_SOCK = \"docker.sock\";", "type": "String", "var_name": "DOCKER_SOCK" }, { "declarator": "DOCKERINIT = \".dockerinit\"", "modi...
{ "body": "public boolean isSpinning() {\n return dockerEnvPath.exists() && dockerInitPath.exists() && dockerSocketFile.exists();\n }", "class_method_signature": "Top.isSpinning()", "constructor": false, "full_signature": "public boolean isSpinning()", "identifier": "isSpinning", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_132
{ "fields": [ { "declarator": "CUBE_ID = \"test\"", "modifier": "public static final", "original_string": "public static final String CUBE_ID = \"test\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"_MISSING_\"", "modifier": "p...
{ "body": "@Test\n public void shouldDestroyCube() {\n fire(new DestroyCube(CUBE_ID));\n verify(cube).destroy();\n }", "class_method_signature": "CubeLifecycleControllerTest.shouldDestroyCube()", "constructor": false, "full_signature": "@Test public void shouldDestroyCube()", "identifier":...
{ "fields": [], "file": "core/src/main/java/org/arquillian/cube/impl/client/CubeLifecycleController.java", "identifier": "CubeLifecycleController", "interfaces": "", "methods": [ { "class_method_signature": "CubeLifecycleController.create(@Observes CreateCube event, CubeRegistry registry)", "c...
{ "body": "public void destroy(@Observes DestroyCube event, CubeRegistry registry) {\n validateAndGet(registry, event.getCubeId()).destroy();\n }", "class_method_signature": "CubeLifecycleController.destroy(@Observes DestroyCube event, CubeRegistry registry)", "constructor": false, "full_signature": "...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_52
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnAnnotationsFromRootObject() {\n final List<Environment> environments =\n (List<Environment>) ContainerObjectUtil.getAllAnnotations(SecondEnvironmentAnnotation.class,\n Environment.class);\n assertThat(environments.size(), is(1));\n ...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T extends Annotation> List<T> getAllAnnotations(final Class<?> source,\n final Class<T> annotationClass) {\n return AccessController.doPrivileged((PrivilegedAction<List<T>>) () -> {\n List<T> annotations = new ArrayList<>();\n\n Class<?> nextSource = sourc...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_124
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test\n public void shouldDestroyWithCubeIdString() {\n controllerInst.get().destroy(CUBE_ID);\n assertEventFired(DestroyCube.class, 1);\n }", "class_method_signature": "ClientCubeControllerTest.shouldDestroyWithCubeIdString()", "constructor": false, "full_signature": "@Test publi...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void destroy(CubeID cubeId) {\n destroy(cubeId.get());\n }", "class_method_signature": "ClientCubeController.destroy(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void destroy(CubeID cubeId)", "identifier": "destroy", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_91
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_possible_to_show_terabytes_in_human_readable_form(){\n assertThat(humanReadableByteCount(ONE_TERABYTES, true), is(\"1.00 TB\"));\n }", "class_method_signature": "NumberConversionTest.should_be_possible_to_show_terabytes_in_human_readable_form()", "constructor"...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static String humanReadableByteCount(Long bytes, boolean decimal) {\n if (bytes == null) bytes = 0L;\n String sign = bytes < 0 ? \"-\" : \"\";\n Long absBytes = Math.abs(bytes);\n int unit = decimal ? 1000 : 1024;\n if (absBytes < unit) {\n return sign +...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_108
{ "fields": [], "file": "core/src/test/java/org/arquillian/cube/impl/util/StringsTest.java", "identifier": "StringsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_split_test_separated_by_commas() {\n // given\n String content = \"file://${basedir}/elasticsearch.yml,file://${basedir}/configmap.yml\";\n\n // when\n final List<String> strings = Strings.splitAndTrimAsList(content, \"\\\\s*,\\\\s*\");\n\n /...
{ "fields": [], "file": "core/src/main/java/org/arquillian/cube/impl/util/Strings.java", "identifier": "Strings", "interfaces": "", "methods": [ { "class_method_signature": "Strings.Strings()", "constructor": true, "full_signature": "private Strings()", "identifier": "Strings", ...
{ "body": "public static List<String> splitAndTrimAsList(String text, String sep) {\n ArrayList<String> answer = new ArrayList<>();\n if (text != null && text.length() > 0) {\n for (String v : text.split(sep)) {\n String trim = v.trim();\n if (trim.length() > 0) ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_29
{ "fields": [ { "declarator": "executor", "modifier": "@Mock\n private", "original_string": "@Mock\n private CommandLineExecutor executor;", "type": "CommandLineExecutor", "var_name": "executor" } ], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/u...
{ "body": "@Test\n public void shouldListWithFilterDockerMachines() {\n when(executor.execCommandAsArray(\"docker-machine\", \"ls\", \"--filter\", \"state=Running\")).thenReturn(Arrays.asList(\n \"NAME ACTIVE DRIVER STATE URL SWARM\",\n \"dev * ...
{ "fields": [ { "declarator": "DOCKER_MACHINE_EXEC = \"docker-machine\"", "modifier": "public static final", "original_string": "public static final String DOCKER_MACHINE_EXEC = \"docker-machine\";", "type": "String", "var_name": "DOCKER_MACHINE_EXEC" }, { "declarator":...
{ "body": "public Set<Machine> list(String cliPathExec) {\n\n Set<Machine> machines = new HashSet<>();\n List<String> output = commandLineExecutor.execCommandAsArray(createDockerMachineCommand(cliPathExec), \"ls\");\n\n Map<String, Index> headerIndex = calculateStartingFieldsIndex(output.get(0));...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_3
{ "fields": [ { "declarator": "cubeOpenShiftConfiguration", "modifier": "@Mock\n private", "original_string": "@Mock\n private CubeOpenShiftConfiguration cubeOpenShiftConfiguration;", "type": "CubeOpenShiftConfiguration", "var_name": "cubeOpenShiftConfiguration" }, { ...
{ "body": "@Test\n public void shouldFireLifecycleEventsDuringCreate() {\n buildablePodCube.create();\n assertEventFired(BeforeCreate.class, 1);\n assertEventFired(AfterCreate.class, 1);\n }", "class_method_signature": "BuildablePodCubeTest.shouldFireLifecycleEventsDuringCreate()", "con...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private String id;", "type": "String", "var_name": "id" }, { "declarator": "resource", "modifier": "private", "original_string": "private Pod resource;", "type": "Pod", ...
{ "body": "@Override\n public void create() throws CubeControlException {\n try {\n lifecycle.fire(new BeforeCreate(id));\n holder = client.build(template);\n this.state = State.CREATED;\n lifecycle.fire(new AfterCreate(id));\n } catch (Exception e) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_68
{ "fields": [ { "declarator": "configResolver", "modifier": "@Mock", "original_string": "@Mock\n CubeDockerConfigurationResolver configResolver;", "type": "CubeDockerConfigurationResolver", "var_name": "configResolver" }, { "declarator": "commandLineExecutor", ...
{ "body": "@Test\n public void testDockerRequirementCheckDockerURLIsValid() throws Exception {\n FakeDockerServer server = new FakeDockerServer();\n\n Map<String, String> configMap = new HashMap<>();\n configMap.put(CubeDockerConfiguration.DOCKER_URI, server.getConnectionString());\n\n ...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" }, { "declarator": "resolver", "modifier...
{ "body": "@Override\n public void check(RequiresDocker context) throws UnsatisfiedRequirementException {\n try {\n Map<String, String> config = resolver.resolve(new HashMap<String, String>());\n String serverUrl = config.get(CubeDockerConfiguration.DOCKER_URI);\n if (String...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_87
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_return_zero_to_null(){\n assertThat(convertToLong(null), is(0L));\n }", "class_method_signature": "NumberConversionTest.should_be_return_zero_to_null()", "constructor": false, "full_signature": "@Test public void should_be_return_zero_to_null()", "identif...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static long convertToLong(Object number) {\n long longNumber = 0;\n if (number != null) {\n NumberType type = NumberType.valueOf(number.getClass().getSimpleName().toUpperCase());\n\n switch (type) {\n case BYTE:\n longNumber = ((B...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_48
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnParentValueIfClassNotAnnotated() throws NoSuchMethodException {\n final String value = ContainerObjectUtil.getTopCubeAttribute(ParentWithAnnotation.class, \"value\", Cube.class, \"\");\n assertThat(value, is(\"secondValue\"));\n }", "class_method_signat...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T> T getTopCubeAttribute(final Class<?> source, final String nameField,\n final Class<? extends Annotation> annotationClass, final T defaultValue) {\n return AccessController.doPrivileged((PrivilegedAction<T>) () -> {\n Method field = null;\n try {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_128
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldFailOnDestroyWithMissingCubeId() {\n controllerInst.get().destroy(MISSING_CUBE_ID);\n }", "class_method_signature": "ClientCubeControllerTest.shouldFailOnDestroyWithMissingCubeId()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void destroy(CubeID cubeId) {\n destroy(cubeId.get());\n }", "class_method_signature": "ClientCubeController.destroy(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void destroy(CubeID cubeId)", "identifier": "destroy", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_104
{ "fields": [ { "declarator": "SIMPLE_SCENARIO =\n \"helloworld:\\n\" +\n \" image: dockercloud/hello-world\\n\" +\n \" portBindings: [8080->80/tcp]\"", "modifier": "private static final", "original_string": "private static final String SIMPLE_SCENARIO =\n \...
{ "body": "@Test\n public void should_resolve_exposed_port_as_bind_port_if_no_definitions() {\n RestAssuredCustomizer restAssuredCustomizer = new RestAssuredCustomizer();\n\n Map<String, String> conf = new HashMap<>();\n conf.put(\"baseUri\", \"http://localhost\");\n conf.put(\"port\", ...
{ "fields": [ { "declarator": "cubeDockerConfigurationInstance", "modifier": "@Inject", "original_string": "@Inject\n Instance<CubeDockerConfiguration> cubeDockerConfigurationInstance;", "type": "Instance<CubeDockerConfiguration>", "var_name": "cubeDockerConfigurationInstance" ...
{ "body": "void configureRequestSpecBuilder(@Observes RestAssuredConfiguration restAssuredConfiguration,\n CubeDockerConfiguration cubeDockerConfiguration, RequestSpecBuilder requestSpecBuilder) {\n if (restAssuredConfiguration.isBaseUriSet()) {\n requestSpecBuilder.setBaseUri(restAssuredConf...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_72
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/client/DockerContainerDefinitionParserTest.java", "identifier": "DockerContainerDefinitionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_get_uri_from_src_test_or_main_resources() {\n final URI resources =\n DockerContainerDefinitionParser.checkSrcTestAndMainResources(\"simple-docker-compose\", \"resources\");\n assertThat(resources).isNotNull();\n }", "class_method_signature": "Doc...
{ "fields": [ { "declarator": "logger = Logger.getLogger(DockerContainerDefinitionParser.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(DockerContainerDefinitionParser.class.getName());", "type": "Logger", ...
{ "body": "static URI checkSrcTestAndMainResources(String filename, String outerDirectory) {\n final Path testPath = Paths.get(\"src\", \"test\", outerDirectory, filename);\n final Path testDefinitionPath = resolveDockerDefinition(testPath);\n if (testDefinitionPath != null) {\n return...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_25
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" }, { "decl...
{ "body": "@Test\n public void should_discard_recording_if_configured_in_only_failing_and_passed_test()\n throws IOException, NoSuchMethodException {\n\n final File destination = temporaryFolder.newFolder(\"destination\");\n final File video = temporaryFolder.newFile(\"file.flv\");\n\n ...
{ "fields": [ { "declarator": "afterVideoRecordedEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<AfterVideoRecorded> afterVideoRecordedEvent;", "type": "Event<AfterVideoRecorded>", "var_name": "afterVideoRecordedEvent" }, { "declarator": "seleniumC...
{ "body": "public void stopRecording(@Observes After afterTestMethod, TestResult testResult,\n CubeDroneConfiguration cubeDroneConfiguration, SeleniumContainers seleniumContainers) {\n\n try {\n if (this.vnc != null) {\n vnc.stop();\n\n Path finalLocation = null;...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_33
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/SinglePortBindResolverTest.java", "identifier": "SinglePortBindResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_resolve_two_bind_port_from_different_containers_with_exclusions() {\n String content =\n \"tomcat:\\n\" +\n \" image: tutum/tomcat:8.0\\n\" +\n \" portBindings: [8080/tcp]\\n\" +\n \" links:\\n\" +\n ...
{ "fields": [ { "declarator": "NO_PORT = -1", "modifier": "private static final", "original_string": "private static final int NO_PORT = -1;", "type": "int", "var_name": "NO_PORT" } ], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/SinglePortBindRes...
{ "body": "public static int resolveBindPort(CubeDockerConfiguration cubeDockerConfiguration, int exposedPort,\n String... excludedContainers) {\n final PortBindInfo portBinding = resolvePortBindPort(cubeDockerConfiguration, exposedPort, excludedContainers);\n\n if (portBinding == null) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_112
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "private", "original_string": "private CubeRegistry cubeRegistry;", "type": "CubeRegistry", "var_name": "cubeRegistry" } ], "file": "core/src/test/java/org/arquillian/cube/impl/model/LocalCubeRegistryTest.java", "ide...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldNotBeAbleToAddCubeByStarredCubeId() throws Exception {\n // given:\n String cubeId = \"tomcat*\";\n Cube cube = createCubeMock(cubeId);\n\n // when:\n cubeRegistry.addCube(cube);\n }", "class_met...
{ "fields": [ { "declarator": "cubes", "modifier": "private", "original_string": "private Map<CubeId, Cube<?>> cubes;", "type": "Map<CubeId, Cube<?>>", "var_name": "cubes" } ], "file": "core/src/main/java/org/arquillian/cube/impl/model/LocalCubeRegistry.java", "identifier":...
{ "body": "@Override\n public void addCube(Cube<?> cube) {\n CubeId cubeId = CubeIdFactory.get().create(cube.getId());\n\n if (cubeId instanceof StarredCubeId) {\n throw new IllegalArgumentException(\"Starred cube id cannot be added.\");\n }\n\n this.cubes.put(cubeId, cube);\...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_64
{ "fields": [ { "declarator": "configResolver", "modifier": "@Mock", "original_string": "@Mock\n CubeDockerConfigurationResolver configResolver;", "type": "CubeDockerConfigurationResolver", "var_name": "configResolver" }, { "declarator": "commandLineExecutor", ...
{ "body": "@Test(expected = UnsatisfiedRequirementException.class)\n public void testDockerRequirementCheckWhenExecutionExceptionThrown() throws UnsatisfiedRequirementException {\n when(configResolver.resolve(anyMap())).thenThrow(ExecutionException.class);\n\n DockerRequirement requirement = new Dock...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" }, { "declarator": "resolver", "modifier...
{ "body": "@Override\n public void check(RequiresDocker context) throws UnsatisfiedRequirementException {\n try {\n Map<String, String> config = resolver.resolve(new HashMap<String, String>());\n String serverUrl = config.get(CubeDockerConfiguration.DOCKER_URI);\n if (String...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_65
{ "fields": [ { "declarator": "configResolver", "modifier": "@Mock", "original_string": "@Mock\n CubeDockerConfigurationResolver configResolver;", "type": "CubeDockerConfigurationResolver", "var_name": "configResolver" }, { "declarator": "commandLineExecutor", ...
{ "body": "@Test(expected = UnsatisfiedRequirementException.class)\n public void testDockerRequirementCheckWhenDockerURLIsNull() throws UnsatisfiedRequirementException {\n Map<String, String> configMap = new HashMap<>();\n configMap.put(CubeDockerConfiguration.DOCKER_URI, null);\n\n when(confi...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" }, { "declarator": "resolver", "modifier...
{ "body": "@Override\n public void check(RequiresDocker context) throws UnsatisfiedRequirementException {\n try {\n Map<String, String> config = resolver.resolve(new HashMap<String, String>());\n String serverUrl = config.get(CubeDockerConfiguration.DOCKER_URI);\n if (String...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_113
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "private", "original_string": "private CubeRegistry cubeRegistry;", "type": "CubeRegistry", "var_name": "cubeRegistry" } ], "file": "core/src/test/java/org/arquillian/cube/impl/model/LocalCubeRegistryTest.java", "ide...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldNotBeAbleToRemoveCubeByStarredCubeId() throws Exception {\n // given:\n String cubeId = \"tomcat*\";\n\n // when:\n cubeRegistry.removeCube(cubeId);\n }", "class_method_signature": "LocalCubeRegistryTes...
{ "fields": [ { "declarator": "cubes", "modifier": "private", "original_string": "private Map<CubeId, Cube<?>> cubes;", "type": "Map<CubeId, Cube<?>>", "var_name": "cubes" } ], "file": "core/src/main/java/org/arquillian/cube/impl/model/LocalCubeRegistry.java", "identifier":...
{ "body": "@Override\n public void removeCube(String id) {\n CubeId cubeId = CubeIdFactory.get().create(id);\n\n if (cubeId instanceof StarredCubeId) {\n throw new IllegalArgumentException(\"Starred cube id cannot be removed.\");\n }\n\n cubes.remove(cubeId);\n }", "clas...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_32
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/SinglePortBindResolverTest.java", "identifier": "SinglePortBindResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void should_throw_exception_with_resolve_two_bind_port_from_different_containers() {\n String content =\n \"tomcat:\\n\" +\n \" image: tutum/tomcat:8.0\\n\" +\n \" portBindings: [8080/tcp]\\n\" +\...
{ "fields": [ { "declarator": "NO_PORT = -1", "modifier": "private static final", "original_string": "private static final int NO_PORT = -1;", "type": "int", "var_name": "NO_PORT" } ], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/SinglePortBindRes...
{ "body": "public static int resolveBindPort(CubeDockerConfiguration cubeDockerConfiguration, int exposedPort,\n String... excludedContainers) {\n final PortBindInfo portBinding = resolvePortBindPort(cubeDockerConfiguration, exposedPort, excludedContainers);\n\n if (portBinding == null) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_24
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" }, { "decl...
{ "body": "@Test\n public void should_stop_vnc_by_default() throws IOException, NoSuchMethodException {\n\n final File destination = temporaryFolder.newFolder(\"destination\");\n final File video = temporaryFolder.newFile(\"file.flv\");\n\n when(seleniumContainers.getVideoRecordingFile()).then...
{ "fields": [ { "declarator": "afterVideoRecordedEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<AfterVideoRecorded> afterVideoRecordedEvent;", "type": "Event<AfterVideoRecorded>", "var_name": "afterVideoRecordedEvent" }, { "declarator": "seleniumC...
{ "body": "public void stopRecording(@Observes After afterTestMethod, TestResult testResult,\n CubeDroneConfiguration cubeDroneConfiguration, SeleniumContainers seleniumContainers) {\n\n try {\n if (this.vnc != null) {\n vnc.stop();\n\n Path finalLocation = null;...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_73
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/client/DockerContainerDefinitionParserTest.java", "identifier": "DockerContainerDefinitionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_get_null_uri_from_src_test_or_main_resources() {\n final URI resources =\n DockerContainerDefinitionParser.checkSrcTestAndMainResources(\"none-existing-simple-docker-compose\",\n \"resources\");\n assertThat(resources).isNull();\n }",...
{ "fields": [ { "declarator": "logger = Logger.getLogger(DockerContainerDefinitionParser.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(DockerContainerDefinitionParser.class.getName());", "type": "Logger", ...
{ "body": "static URI checkSrcTestAndMainResources(String filename, String outerDirectory) {\n final Path testPath = Paths.get(\"src\", \"test\", outerDirectory, filename);\n final Path testDefinitionPath = resolveDockerDefinition(testPath);\n if (testDefinitionPath != null) {\n return...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_105
{ "fields": [ { "declarator": "SIMPLE_SCENARIO =\n \"helloworld:\\n\" +\n \" image: dockercloud/hello-world\\n\" +\n \" portBindings: [8080->80/tcp]\"", "modifier": "private static final", "original_string": "private static final String SIMPLE_SCENARIO =\n \...
{ "body": "@Test\n public void should_set_relaxed_https_validation_in_all_protocols() {\n RestAssuredCustomizer restAssuredCustomizer = new RestAssuredCustomizer();\n\n Map<String, String> conf = new HashMap<>();\n conf.put(\"baseUri\", \"http://localhost\");\n conf.put(\"port\", \"8081...
{ "fields": [ { "declarator": "cubeDockerConfigurationInstance", "modifier": "@Inject", "original_string": "@Inject\n Instance<CubeDockerConfiguration> cubeDockerConfigurationInstance;", "type": "Instance<CubeDockerConfiguration>", "var_name": "cubeDockerConfigurationInstance" ...
{ "body": "void configureRequestSpecBuilder(@Observes RestAssuredConfiguration restAssuredConfiguration,\n CubeDockerConfiguration cubeDockerConfiguration, RequestSpecBuilder requestSpecBuilder) {\n if (restAssuredConfiguration.isBaseUriSet()) {\n requestSpecBuilder.setBaseUri(restAssuredConf...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_129
{ "fields": [ { "declarator": "CUBE_ID = \"test\"", "modifier": "public static final", "original_string": "public static final String CUBE_ID = \"test\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"_MISSING_\"", "modifier": "p...
{ "body": "@Test\n public void shouldCreateCube() {\n fire(new CreateCube(CUBE_ID));\n verify(cube).create();\n }", "class_method_signature": "CubeLifecycleControllerTest.shouldCreateCube()", "constructor": false, "full_signature": "@Test public void shouldCreateCube()", "identifier": "sho...
{ "fields": [], "file": "core/src/main/java/org/arquillian/cube/impl/client/CubeLifecycleController.java", "identifier": "CubeLifecycleController", "interfaces": "", "methods": [ { "class_method_signature": "CubeLifecycleController.create(@Observes CreateCube event, CubeRegistry registry)", "c...
{ "body": "public void create(@Observes CreateCube event, CubeRegistry registry) {\n validateAndGet(registry, event.getCubeId()).create();\n }", "class_method_signature": "CubeLifecycleController.create(@Observes CreateCube event, CubeRegistry registry)", "constructor": false, "full_signature": "publi...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_49
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnDefaultValueInCaseOfDefaults() throws NoSuchMethodException {\n final String value = ContainerObjectUtil.getTopCubeAttribute(DefaultAnnotation.class, \"value\", Cube.class, \"\");\n assertThat(value, is(\"\"));\n }", "class_method_signature": "Container...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T> T getTopCubeAttribute(final Class<?> source, final String nameField,\n final Class<? extends Annotation> annotationClass, final T defaultValue) {\n return AccessController.doPrivileged((PrivilegedAction<T>) () -> {\n Method field = null;\n try {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_69
{ "fields": [ { "declarator": "FULL_LOG =\n \"FROM ubuntu:12.04 ---> f959d044ebdfStep 1 : MAINTAINER Bruno Crane BrunoGilbertCrane@users.noreply.github.com ---> \"\n +\n \"Running in dfda3b1da834 ---> f3829d9d380fRemoving intermediate container dfda3b1da834Step 2 : ENV JAVA_HOME...
{ "body": "@Test\n public void testGetImageId() throws Exception {\n String imageId = DockerClientExecutor.getImageId(FULL_LOG);\n Assert.assertNotNull(\"Pattern matching failed\", imageId);\n\n // All images are identified by a 64 hexadecimal digit string\n // https://docs.docker.com/t...
{ "fields": [ { "declarator": "PATH_IN_CONTAINER = \"pathInContainer\"", "modifier": "public static final", "original_string": "public static final String PATH_IN_CONTAINER = \"pathInContainer\";", "type": "String", "var_name": "PATH_IN_CONTAINER" }, { "declarator": "PA...
{ "body": "public static String getImageId(String fullLog) {\n Matcher m = IMAGEID_PATTERN.matcher(fullLog);\n String imageId = null;\n if (m.find()) {\n imageId = m.group(1);\n }\n return imageId;\n }", "class_method_signature": "DockerClientExecutor.getImageId(Stri...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_86
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_convert_hex_to_long(){\n assertThat(convertToLong(0x10), is(16L));\n }", "class_method_signature": "NumberConversionTest.should_be_convert_hex_to_long()", "constructor": false, "full_signature": "@Test public void should_be_convert_hex_to_long()", "identif...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static long convertToLong(Object number) {\n long longNumber = 0;\n if (number != null) {\n NumberType type = NumberType.valueOf(number.getClass().getSimpleName().toUpperCase());\n\n switch (type) {\n case BYTE:\n longNumber = ((B...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_2
{ "fields": [ { "declarator": "adapter", "modifier": "@Mock", "original_string": "@Mock\n OpenShiftAdapter adapter;", "type": "OpenShiftAdapter", "var_name": "adapter" }, { "declarator": "configuration", "modifier": "@Mock", "original_string": "@Mock\n ...
{ "body": "@Test\n public void testMultipleDynamicOpenShiftResource() throws Exception {\n OpenShiftResourceFactory.createResources(\"key\", adapter, MultipleOpenShiftDynamicImageStreamResourceExample.class, configuration.getProperties());\n ArgumentCaptor<ByteArrayInputStream> captor = ArgumentCapto...
{ "fields": [ { "declarator": "log = Logger.getLogger(OpenShiftResourceFactory.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(OpenShiftResourceFactory.class.getName());", "type": "Logger", "var_name": "log...
{ "body": "public static void createResources(String resourcesKey, OpenShiftAdapter adapter, Class<?> testClass, Properties properties) {\n try {\n final StringResolver resolver = Strings.createStringResolver(properties);\n\n List<OpenShiftDynamicImageStreamResource> openShiftDynamicImage...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_28
{ "fields": [ { "declarator": "executor", "modifier": "@Mock\n private", "original_string": "@Mock\n private CommandLineExecutor executor;", "type": "CommandLineExecutor", "var_name": "executor" } ], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/u...
{ "body": "@Test\n public void shouldListDockerMachines() {\n when(executor.execCommandAsArray(\"docker-machine\", \"ls\")).thenReturn(Arrays.asList(\n \"NAME ACTIVE DRIVER STATE URL SWARM\",\n \"dev * virtualbox Running tcp://192.168...
{ "fields": [ { "declarator": "DOCKER_MACHINE_EXEC = \"docker-machine\"", "modifier": "public static final", "original_string": "public static final String DOCKER_MACHINE_EXEC = \"docker-machine\";", "type": "String", "var_name": "DOCKER_MACHINE_EXEC" }, { "declarator":...
{ "body": "public Set<Machine> list(String cliPathExec) {\n\n Set<Machine> machines = new HashSet<>();\n List<String> output = commandLineExecutor.execCommandAsArray(createDockerMachineCommand(cliPathExec), \"ls\");\n\n Map<String, Index> headerIndex = calculateStartingFieldsIndex(output.get(0));...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_109
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "file": "co...
{ "body": "@Test\n public void shouldMergeToEmptyMap() {\n Map<String, Object> original = new HashMap<>();\n\n Map<String, Object> element = new HashMap<>();\n element.put(\"a\", \"b\");\n Map<String, Object> element2 = new HashMap<>();\n element2.put(\"c\", \"d\");\n elem...
{ "fields": [ { "declarator": "BUFFER = 2048", "modifier": "private static final", "original_string": "private static final int BUFFER = 2048;", "type": "int", "var_name": "BUFFER" }, { "declarator": "INDENT_STRING = \" \"", "modifier": "private static final", ...
{ "body": "public static Map<String, Object> deepMerge(Map<String, Object> original, Map<String, Object> newMap) {\n for (String key : newMap.keySet()) {\n if (newMap.get(key) instanceof Map && original.get(key) instanceof Map) {\n Map<String, Object> originalChild = (Map<String, Obje...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_90
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_possible_to_show_gigabytes_in_human_readable_form(){\n assertThat(humanReadableByteCount(HUNDRED_GIGABYTES, true), is(\"100.00 GB\"));\n }", "class_method_signature": "NumberConversionTest.should_be_possible_to_show_gigabytes_in_human_readable_form()", "constr...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static String humanReadableByteCount(Long bytes, boolean decimal) {\n if (bytes == null) bytes = 0L;\n String sign = bytes < 0 ? \"-\" : \"\";\n Long absBytes = Math.abs(bytes);\n int unit = decimal ? 1000 : 1024;\n if (absBytes < unit) {\n return sign +...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_125
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldFailOnCreateWithMissingCubeId() {\n controllerInst.get().create(MISSING_CUBE_ID);\n }", "class_method_signature": "ClientCubeControllerTest.shouldFailOnCreateWithMissingCubeId()", "constructor": false, "full_signature":...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void create(CubeID cubeId) {\n create(cubeId.get());\n }", "class_method_signature": "ClientCubeController.create(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void create(CubeID cubeId)", "identifier": "create", "invocations": [ "c...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_53
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnAggregationAnnotationsOfAllObjectHierarchy() {\n final List<Environment> environments =\n (List<Environment>) ContainerObjectUtil.getAllAnnotations(FirstEnvironmentAnnotation.class,\n Environment.class);\n assertThat(environments.si...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T extends Annotation> List<T> getAllAnnotations(final Class<?> source,\n final Class<T> annotationClass) {\n return AccessController.doPrivileged((PrivilegedAction<List<T>>) () -> {\n List<T> annotations = new ArrayList<>();\n\n Class<?> nextSource = sourc...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_133
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "file": "co...
{ "body": "@Test\n public void shouldCacheFirstTime() throws IOException {\n final File newFolder = temporaryFolder.newFolder();\n CacheUrlAsset cacheUrlAsset =\n new CacheUrlAsset(new URL(\"http://arquillian.org/images/arquillian_crown_icon_glossy_256.png\"));\n CacheUrlAsset.TEMP_...
{ "fields": [ { "declarator": "TEMP_LOCATION = System.getProperty(\"java.io.tmpdir\")", "modifier": "static", "original_string": "static String TEMP_LOCATION = System.getProperty(\"java.io.tmpdir\");", "type": "String", "var_name": "TEMP_LOCATION" }, { "declarator": "ex...
{ "body": "@Override\n public InputStream openStream() {\n final URL source = this.getSource();\n String fileName = getFileName(source);\n\n File file = new File(TEMP_LOCATION, fileName);\n try {\n if (!file.exists() || !file.isFile() || isExpired(file)) {\n In...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_45
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnFirstValue() throws NoSuchMethodException {\n final String value = ContainerObjectUtil.getTopCubeAttribute(SecondClassAnnotated.class, \"value\", Cube.class, \"\");\n assertThat(value, is(\"secondValue\"));\n }", "class_method_signature": "ContainerObje...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T> T getTopCubeAttribute(final Class<?> source, final String nameField,\n final Class<? extends Annotation> annotationClass, final T defaultValue) {\n return AccessController.doPrivileged((PrivilegedAction<T>) () -> {\n Method field = null;\n try {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_12
{ "fields": [], "file": "kubernetes/kubernetes/src/test/java/org/arquillian/cube/kubernetes/impl/DefaultConfigurationTest.java", "identifier": "DefaultConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test //We just want to know it won't barf\n public void shouldParseJustAKey() throws Exception {\n String s = \"KEY1\";\n\n Map<String, String> result = DefaultConfiguration.parseMap(s);\n assertThat(result).hasSize(1);\n }", "class_method_signature": "DefaultConfigurationTest...
{ "fields": [ { "declarator": "ENV_VAR_REGEX = \"env.([a-zA-Z0-9_]+)\"", "modifier": "private static final", "original_string": "private static final String ENV_VAR_REGEX = \"env.([a-zA-Z0-9_]+)\";", "type": "String", "var_name": "ENV_VAR_REGEX" }, { "declarator": "ENV_...
{ "body": "public static Map<String, String> parseMap(String s) throws IOException {\n if (Strings.isNullOrEmpty(s)) {\n return Collections.EMPTY_MAP;\n }\n\n Properties properties = new Properties();\n try (InputStream is = new ByteArrayInputStream(s.getBytes(Charset.defaultCha...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_85
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_convert_integer_to_long(){\n assertThat(convertToLong(2147483647), is(2147483647L));\n }", "class_method_signature": "NumberConversionTest.should_be_convert_integer_to_long()", "constructor": false, "full_signature": "@Test public void should_be_convert_inte...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static long convertToLong(Object number) {\n long longNumber = 0;\n if (number != null) {\n NumberType type = NumberType.valueOf(number.getClass().getSimpleName().toUpperCase());\n\n switch (type) {\n case BYTE:\n longNumber = ((B...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_1
{ "fields": [ { "declarator": "adapter", "modifier": "@Mock", "original_string": "@Mock\n OpenShiftAdapter adapter;", "type": "OpenShiftAdapter", "var_name": "adapter" }, { "declarator": "configuration", "modifier": "@Mock", "original_string": "@Mock\n ...
{ "body": "@Test\n public void testSecureDynamicOpenShiftResource() throws Exception {\n OpenShiftResourceFactory.createResources(\"key\", adapter, SecureOpenShiftDynamicImageStreamResourceExample.class, configuration.getProperties());\n ArgumentCaptor<ByteArrayInputStream> captor = ArgumentCaptor.fo...
{ "fields": [ { "declarator": "log = Logger.getLogger(OpenShiftResourceFactory.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(OpenShiftResourceFactory.class.getName());", "type": "Logger", "var_name": "log...
{ "body": "public static void createResources(String resourcesKey, OpenShiftAdapter adapter, Class<?> testClass, Properties properties) {\n try {\n final StringResolver resolver = Strings.createStringResolver(properties);\n\n List<OpenShiftDynamicImageStreamResource> openShiftDynamicImage...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_93
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_possible_to_show_pebibytes_in_human_readable_form(){\n assertThat(humanReadableByteCount(ONE_PEBIBYTE, false), is(\"1.00 PiB\"));\n }", "class_method_signature": "NumberConversionTest.should_be_possible_to_show_pebibytes_in_human_readable_form()", "constructor...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static String humanReadableByteCount(Long bytes, boolean decimal) {\n if (bytes == null) bytes = 0L;\n String sign = bytes < 0 ? \"-\" : \"\";\n Long absBytes = Math.abs(bytes);\n int unit = decimal ? 1000 : 1024;\n if (absBytes < unit) {\n return sign +...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_126
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldFailOnStartWithMissingCubeId() {\n controllerInst.get().start(MISSING_CUBE_ID);\n }", "class_method_signature": "ClientCubeControllerTest.shouldFailOnStartWithMissingCubeId()", "constructor": false, "full_signature": "@...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void start(CubeID cubeId) {\n start(cubeId.get());\n }", "class_method_signature": "ClientCubeController.start(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void start(CubeID cubeId)", "identifier": "start", "invocations": [ "start"...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_50
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnParentValueIfCurrentIsDefault() throws NoSuchMethodException {\n final String value =\n ContainerObjectUtil.getTopCubeAttribute(DefaultAnnotationWithExtension.class, \"value\", Cube.class, \"\");\n assertThat(value, is(\"secondValue\"));\n }", ...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T> T getTopCubeAttribute(final Class<?> source, final String nameField,\n final Class<? extends Annotation> annotationClass, final T defaultValue) {\n return AccessController.doPrivileged((PrivilegedAction<T>) () -> {\n Method field = null;\n try {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_130
{ "fields": [ { "declarator": "CUBE_ID = \"test\"", "modifier": "public static final", "original_string": "public static final String CUBE_ID = \"test\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"_MISSING_\"", "modifier": "p...
{ "body": "@Test\n public void shouldStartCube() {\n fire(new StartCube(CUBE_ID));\n verify(cube).start();\n }", "class_method_signature": "CubeLifecycleControllerTest.shouldStartCube()", "constructor": false, "full_signature": "@Test public void shouldStartCube()", "identifier": "shouldSt...
{ "fields": [], "file": "core/src/main/java/org/arquillian/cube/impl/client/CubeLifecycleController.java", "identifier": "CubeLifecycleController", "interfaces": "", "methods": [ { "class_method_signature": "CubeLifecycleController.create(@Observes CreateCube event, CubeRegistry registry)", "c...
{ "body": "public void start(@Observes StartCube event, CubeRegistry registry) {\n validateAndGet(registry, event.getCubeId()).start();\n }", "class_method_signature": "CubeLifecycleController.start(@Observes StartCube event, CubeRegistry registry)", "constructor": false, "full_signature": "public voi...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_46
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnTopValue() throws NoSuchMethodException {\n final String value = ContainerObjectUtil.getTopCubeAttribute(FirstClassAnnotated.class, \"value\", Cube.class, \"\");\n assertThat(value, is(\"firstValue\"));\n }", "class_method_signature": "ContainerObjectUt...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T> T getTopCubeAttribute(final Class<?> source, final String nameField,\n final Class<? extends Annotation> annotationClass, final T defaultValue) {\n return AccessController.doPrivileged((PrivilegedAction<T>) () -> {\n Method field = null;\n try {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_11
{ "fields": [], "file": "kubernetes/kubernetes/src/test/java/org/arquillian/cube/kubernetes/impl/DefaultConfigurationTest.java", "identifier": "DefaultConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldParseEmptyMap() throws Exception {\n Map<String, String> result = DefaultConfiguration.parseMap(\"\");\n assertThat(result).hasSize(0);\n }", "class_method_signature": "DefaultConfigurationTest.shouldParseEmptyMap()", "constructor": false, "full_signature...
{ "fields": [ { "declarator": "ENV_VAR_REGEX = \"env.([a-zA-Z0-9_]+)\"", "modifier": "private static final", "original_string": "private static final String ENV_VAR_REGEX = \"env.([a-zA-Z0-9_]+)\";", "type": "String", "var_name": "ENV_VAR_REGEX" }, { "declarator": "ENV_...
{ "body": "public static Map<String, String> parseMap(String s) throws IOException {\n if (Strings.isNullOrEmpty(s)) {\n return Collections.EMPTY_MAP;\n }\n\n Properties properties = new Properties();\n try (InputStream is = new ByteArrayInputStream(s.getBytes(Charset.defaultCha...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_89
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_possible_to_show_megabytes_in_human_readable_form(){\n assertThat(humanReadableByteCount(TEN_MEGABYTES, true), is(\"10.00 MB\"));\n }", "class_method_signature": "NumberConversionTest.should_be_possible_to_show_megabytes_in_human_readable_form()", "constructor...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static String humanReadableByteCount(Long bytes, boolean decimal) {\n if (bytes == null) bytes = 0L;\n String sign = bytes < 0 ? \"-\" : \"\";\n Long absBytes = Math.abs(bytes);\n int unit = decimal ? 1000 : 1024;\n if (absBytes < unit) {\n return sign +...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_66
{ "fields": [ { "declarator": "configResolver", "modifier": "@Mock", "original_string": "@Mock\n CubeDockerConfigurationResolver configResolver;", "type": "CubeDockerConfigurationResolver", "var_name": "configResolver" }, { "declarator": "commandLineExecutor", ...
{ "body": "@Test(expected = UnsatisfiedRequirementException.class)\n public void testDockerRequirementCheckWhenDockerURLIsEmpty() throws UnsatisfiedRequirementException {\n Map<String, String> configMap = new HashMap<>();\n configMap.put(CubeDockerConfiguration.DOCKER_URI, \"\");\n\n when(conf...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" }, { "declarator": "resolver", "modifier...
{ "body": "@Override\n public void check(RequiresDocker context) throws UnsatisfiedRequirementException {\n try {\n Map<String, String> config = resolver.resolve(new HashMap<String, String>());\n String serverUrl = config.get(CubeDockerConfiguration.DOCKER_URI);\n if (String...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_110
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "file": "co...
{ "body": "@Test\n public void shouldAddSimpleAndComplexElements() {\n Map<String, Object> original = new HashMap<>();\n original.put(\"z\", \"y\");\n\n Map<String, Object> element = new HashMap<>();\n element.put(\"a\", \"b\");\n Map<String, Object> element2 = new HashMap<>();\n...
{ "fields": [ { "declarator": "BUFFER = 2048", "modifier": "private static final", "original_string": "private static final int BUFFER = 2048;", "type": "int", "var_name": "BUFFER" }, { "declarator": "INDENT_STRING = \" \"", "modifier": "private static final", ...
{ "body": "public static Map<String, Object> deepMerge(Map<String, Object> original, Map<String, Object> newMap) {\n for (String key : newMap.keySet()) {\n if (newMap.get(key) instanceof Map && original.get(key) instanceof Map) {\n Map<String, Object> originalChild = (Map<String, Obje...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_31
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/SinglePortBindResolverTest.java", "identifier": "SinglePortBindResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void should_throw_exception_with_resolve_two_bind_port() {\n String content =\n \"tomcat:\\n\" +\n \" image: tutum/tomcat:8.0\\n\" +\n \" portBindings: [8080/tcp, 8081/tcp]\\n\" +\n ...
{ "fields": [ { "declarator": "NO_PORT = -1", "modifier": "private static final", "original_string": "private static final int NO_PORT = -1;", "type": "int", "var_name": "NO_PORT" } ], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/SinglePortBindRes...
{ "body": "public static int resolveBindPort(CubeDockerConfiguration cubeDockerConfiguration, int exposedPort,\n String... excludedContainers) {\n final PortBindInfo portBinding = resolvePortBindPort(cubeDockerConfiguration, exposedPort, excludedContainers);\n\n if (portBinding == null) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_27
{ "fields": [ { "declarator": "executor", "modifier": "@Mock\n private", "original_string": "@Mock\n private CommandLineExecutor executor;", "type": "CommandLineExecutor", "var_name": "executor" } ], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/u...
{ "body": "@Test\n public void shouldParseStoppedMachines() {\n when(executor.execCommandAsArray(\"docker-machine\", \"ls\")).thenReturn(Arrays.asList(\n \"NAME ACTIVE DRIVER STATE URL SWARM\",\n \"dev - virtualbox Stopped ...
{ "fields": [ { "declarator": "DOCKER_MACHINE_EXEC = \"docker-machine\"", "modifier": "public static final", "original_string": "public static final String DOCKER_MACHINE_EXEC = \"docker-machine\";", "type": "String", "var_name": "DOCKER_MACHINE_EXEC" }, { "declarator":...
{ "body": "public Set<Machine> list(String cliPathExec) {\n\n Set<Machine> machines = new HashSet<>();\n List<String> output = commandLineExecutor.execCommandAsArray(createDockerMachineCommand(cliPathExec), \"ls\");\n\n Map<String, Index> headerIndex = calculateStartingFieldsIndex(output.get(0));...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_70
{ "fields": [ { "declarator": "CUBE_ID = \"pingpong\"", "modifier": "public static final", "original_string": "public static final String CUBE_ID = \"pingpong\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "cube", "modifier": "@Mock", "origi...
{ "body": "@Test\n public void should_remove_docker_image_if_built_by_cube() {\n DockerClientExecutor executor = Mockito.mock(DockerClientExecutor.class);\n String config = \"pingpong:\\n\" +\n \" buildImage:\\n\" +\n \" dockerfileLocation: src/test/resources/tomcat\\n\" +\n...
{ "fields": [ { "declarator": "TAG = \":latest\"", "modifier": "private static final", "original_string": "private static final String TAG = \":latest\";", "type": "String", "var_name": "TAG" }, { "declarator": "dockerClientExecutorInstance", "modifier": "@Inject\...
{ "body": "public void removeImage(@Observes AfterDestroy event, CubeRegistry registry, CubeDockerConfiguration configuration) {\n if (configuration.isCleanBuildImage()) {\n String cubeId = event.getCubeId();\n Cube cube = registry.getCube(cubeId);\n if (cube == null) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_106
{ "fields": [], "file": "core/src/test/java/org/arquillian/cube/impl/util/TimespanTest.java", "identifier": "TimespanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_transform_from_milliseconds_string_to_milleseconds() {\n final long milliseconds = Timespan.toMilliseconds(\"250ms\");\n assertThat(milliseconds, is(250L));\n }", "class_method_signature": "TimespanTest.should_transform_from_milliseconds_string_to_millesecon...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO_YEARS = new Timespan(0, TimeUnit.YEA...
{ "body": "public static long toMilliseconds(String timespan) {\n return parseTimespan(timespan).getDurationInMilliseconds();\n }", "class_method_signature": "Timespan.toMilliseconds(String timespan)", "constructor": false, "full_signature": "public static long toMilliseconds(String timespan)", "ide...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_107
{ "fields": [], "file": "core/src/test/java/org/arquillian/cube/impl/util/TimespanTest.java", "identifier": "TimespanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_transform_from_seconds_and_minutes_string_to_milliseconds() {\n final long milliseconds = Timespan.toMilliseconds(\"1m30s\");\n assertThat(milliseconds, is(90000L));\n }", "class_method_signature": "TimespanTest.should_transform_from_seconds_and_minutes_stri...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO_YEARS = new Timespan(0, TimeUnit.YEA...
{ "body": "public static long toMilliseconds(String timespan) {\n return parseTimespan(timespan).getDurationInMilliseconds();\n }", "class_method_signature": "Timespan.toMilliseconds(String timespan)", "constructor": false, "full_signature": "public static long toMilliseconds(String timespan)", "ide...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_71
{ "fields": [ { "declarator": "CUBE_ID = \"pingpong\"", "modifier": "public static final", "original_string": "public static final String CUBE_ID = \"pingpong\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "cube", "modifier": "@Mock", "origi...
{ "body": "@Test\n public void should_not_remove_docker_image_as_not_built_by_cube() {\n DockerClientExecutor executor = Mockito.mock(DockerClientExecutor.class);\n\n String config = \"pingpong:\\n\" +\n \" image: jonmorehouse/ping-pong\\n\" +\n \" exposedPorts: [8080/tcp]\\n\...
{ "fields": [ { "declarator": "TAG = \":latest\"", "modifier": "private static final", "original_string": "private static final String TAG = \":latest\";", "type": "String", "var_name": "TAG" }, { "declarator": "dockerClientExecutorInstance", "modifier": "@Inject\...
{ "body": "public void removeImage(@Observes AfterDestroy event, CubeRegistry registry, CubeDockerConfiguration configuration) {\n if (configuration.isCleanBuildImage()) {\n String cubeId = event.getCubeId();\n Cube cube = registry.getCube(cubeId);\n if (cube == null) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_26
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" }, { "decl...
{ "body": "@Test\n public void should_move_recording_if_configured_in_only_failing_and_failed_test()\n throws IOException, NoSuchMethodException {\n\n final File destination = temporaryFolder.newFolder(\"destination\");\n final File video = temporaryFolder.newFile(\"file.flv\");\n\n whe...
{ "fields": [ { "declarator": "afterVideoRecordedEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<AfterVideoRecorded> afterVideoRecordedEvent;", "type": "Event<AfterVideoRecorded>", "var_name": "afterVideoRecordedEvent" }, { "declarator": "seleniumC...
{ "body": "public void stopRecording(@Observes After afterTestMethod, TestResult testResult,\n CubeDroneConfiguration cubeDroneConfiguration, SeleniumContainers seleniumContainers) {\n\n try {\n if (this.vnc != null) {\n vnc.stop();\n\n Path finalLocation = null;...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_30
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/SinglePortBindResolverTest.java", "identifier": "SinglePortBindResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_resolve_single_bind_port() {\n String content =\n \"tomcat:\\n\" +\n \" image: tutum/tomcat:8.0\\n\" +\n \" portBindings: [8080/tcp]\\n\" +\n \" links:\\n\" +\n \" - ping\\n\" +\n ...
{ "fields": [ { "declarator": "NO_PORT = -1", "modifier": "private static final", "original_string": "private static final int NO_PORT = -1;", "type": "int", "var_name": "NO_PORT" } ], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/SinglePortBindRes...
{ "body": "public static int resolveBindPort(CubeDockerConfiguration cubeDockerConfiguration, int exposedPort,\n String... excludedContainers) {\n final PortBindInfo portBinding = resolvePortBindPort(cubeDockerConfiguration, exposedPort, excludedContainers);\n\n if (portBinding == null) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_111
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "file": "co...
{ "body": "@Test\n public void shouldOverrideSimpleAndComplexElements() {\n Map<String, Object> original = new HashMap<>();\n Map<String, Object> org = new HashMap<>();\n org.put(\"a\", \"1\");\n Map<String, Object> org2 = new HashMap<>();\n org2.put(\"c\", \"2\");\n org.p...
{ "fields": [ { "declarator": "BUFFER = 2048", "modifier": "private static final", "original_string": "private static final int BUFFER = 2048;", "type": "int", "var_name": "BUFFER" }, { "declarator": "INDENT_STRING = \" \"", "modifier": "private static final", ...
{ "body": "public static Map<String, Object> deepMerge(Map<String, Object> original, Map<String, Object> newMap) {\n for (String key : newMap.keySet()) {\n if (newMap.get(key) instanceof Map && original.get(key) instanceof Map) {\n Map<String, Object> originalChild = (Map<String, Obje...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_88
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_possible_to_show_null_as_zero_bytes_in_human_readable_form(){\n assertThat(humanReadableByteCount(null, true), is(\"0 B\"));\n }", "class_method_signature": "NumberConversionTest.should_be_possible_to_show_null_as_zero_bytes_in_human_readable_form()", "constru...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static String humanReadableByteCount(Long bytes, boolean decimal) {\n if (bytes == null) bytes = 0L;\n String sign = bytes < 0 ? \"-\" : \"\";\n Long absBytes = Math.abs(bytes);\n int unit = decimal ? 1000 : 1024;\n if (absBytes < unit) {\n return sign +...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_67
{ "fields": [ { "declarator": "configResolver", "modifier": "@Mock", "original_string": "@Mock\n CubeDockerConfigurationResolver configResolver;", "type": "CubeDockerConfigurationResolver", "var_name": "configResolver" }, { "declarator": "commandLineExecutor", ...
{ "body": "@Test(expected = UnsatisfiedRequirementException.class)\n public void testDockerRequirementCheckWhenDockerURLIsInvalid() throws UnsatisfiedRequirementException {\n Map<String, String> configMap = new HashMap<>();\n configMap.put(CubeDockerConfiguration.DOCKER_URI, \"tcp://nonexistanthostna...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" }, { "declarator": "resolver", "modifier...
{ "body": "@Override\n public void check(RequiresDocker context) throws UnsatisfiedRequirementException {\n try {\n Map<String, String> config = resolver.resolve(new HashMap<String, String>());\n String serverUrl = config.get(CubeDockerConfiguration.DOCKER_URI);\n if (String...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_10
{ "fields": [], "file": "kubernetes/kubernetes/src/test/java/org/arquillian/cube/kubernetes/impl/DefaultConfigurationTest.java", "identifier": "DefaultConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldParseNullMap() throws Exception {\n Map<String, String> result = DefaultConfiguration.parseMap(null);\n assertThat(result).hasSize(0);\n }", "class_method_signature": "DefaultConfigurationTest.shouldParseNullMap()", "constructor": false, "full_signature":...
{ "fields": [ { "declarator": "ENV_VAR_REGEX = \"env.([a-zA-Z0-9_]+)\"", "modifier": "private static final", "original_string": "private static final String ENV_VAR_REGEX = \"env.([a-zA-Z0-9_]+)\";", "type": "String", "var_name": "ENV_VAR_REGEX" }, { "declarator": "ENV_...
{ "body": "public static Map<String, String> parseMap(String s) throws IOException {\n if (Strings.isNullOrEmpty(s)) {\n return Collections.EMPTY_MAP;\n }\n\n Properties properties = new Properties();\n try (InputStream is = new ByteArrayInputStream(s.getBytes(Charset.defaultCha...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_47
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnNullIfNoClassAnnotated() throws NoSuchMethodException {\n final String value = ContainerObjectUtil.getTopCubeAttribute(EmptyClassAnnotation.class, \"value\", Cube.class, \"\");\n assertThat(value, is(nullValue()));\n }", "class_method_signature": "Conta...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T> T getTopCubeAttribute(final Class<?> source, final String nameField,\n final Class<? extends Annotation> annotationClass, final T defaultValue) {\n return AccessController.doPrivileged((PrivilegedAction<T>) () -> {\n Method field = null;\n try {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_131
{ "fields": [ { "declarator": "CUBE_ID = \"test\"", "modifier": "public static final", "original_string": "public static final String CUBE_ID = \"test\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"_MISSING_\"", "modifier": "p...
{ "body": "@Test\n public void shouldStopCube() {\n fire(new StopCube(CUBE_ID));\n verify(cube).stop();\n }", "class_method_signature": "CubeLifecycleControllerTest.shouldStopCube()", "constructor": false, "full_signature": "@Test public void shouldStopCube()", "identifier": "shouldStopCub...
{ "fields": [], "file": "core/src/main/java/org/arquillian/cube/impl/client/CubeLifecycleController.java", "identifier": "CubeLifecycleController", "interfaces": "", "methods": [ { "class_method_signature": "CubeLifecycleController.create(@Observes CreateCube event, CubeRegistry registry)", "c...
{ "body": "public void stop(@Observes StopCube event, CubeRegistry registry) {\n validateAndGet(registry, event.getCubeId()).stop();\n }", "class_method_signature": "CubeLifecycleController.stop(@Observes StopCube event, CubeRegistry registry)", "constructor": false, "full_signature": "public void sto...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_51
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtilTest.java", "identifier": "ContainerObjectUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnArrays() throws NoSuchMethodException {\n final String[] ports = ContainerObjectUtil.\n getTopCubeAttribute(FirstClassWithArray.class, \"portBinding\", Cube.class, new String[] {});\n assertThat(ports[0], is(\"2222->22/tcp\"));\n }", "class_m...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/ContainerObjectUtil.java", "identifier": "ContainerObjectUtil", "interfaces": "", "methods": [ { "class_method_signature": "ContainerObjectUtil.ContainerObjectUtil()", "constructor": true, "full_sig...
{ "body": "public static <T> T getTopCubeAttribute(final Class<?> source, final String nameField,\n final Class<? extends Annotation> annotationClass, final T defaultValue) {\n return AccessController.doPrivileged((PrivilegedAction<T>) () -> {\n Method field = null;\n try {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_127
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldFailOnStopWithMissingCubeId() {\n controllerInst.get().stop(MISSING_CUBE_ID);\n }", "class_method_signature": "ClientCubeControllerTest.shouldFailOnStopWithMissingCubeId()", "constructor": false, "full_signature": "@Tes...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void stop(CubeID cubeId) {\n stop(cubeId.get());\n }", "class_method_signature": "ClientCubeController.stop(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void stop(CubeID cubeId)", "identifier": "stop", "invocations": [ "stop", ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_92
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_possible_to_show_kikibytes_in_human_readable_form(){\n assertThat(humanReadableByteCount(ONE_KIKIBYTE, false), is(\"1.00 KiB\"));\n }", "class_method_signature": "NumberConversionTest.should_be_possible_to_show_kikibytes_in_human_readable_form()", "constructor...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static String humanReadableByteCount(Long bytes, boolean decimal) {\n if (bytes == null) bytes = 0L;\n String sign = bytes < 0 ? \"-\" : \"\";\n Long absBytes = Math.abs(bytes);\n int unit = decimal ? 1000 : 1024;\n if (absBytes < unit) {\n return sign +...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_0
{ "fields": [ { "declarator": "adapter", "modifier": "@Mock", "original_string": "@Mock\n OpenShiftAdapter adapter;", "type": "OpenShiftAdapter", "var_name": "adapter" }, { "declarator": "configuration", "modifier": "@Mock", "original_string": "@Mock\n ...
{ "body": "@Test\n public void testInsecureDynamicOpenShiftResource() throws Exception {\n OpenShiftResourceFactory.createResources(\"key\", adapter, OpenShiftDynamicImageStreamResourceExample.class, configuration.getProperties());\n ArgumentCaptor<ByteArrayInputStream> captor = ArgumentCaptor.forCla...
{ "fields": [ { "declarator": "log = Logger.getLogger(OpenShiftResourceFactory.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(OpenShiftResourceFactory.class.getName());", "type": "Logger", "var_name": "log...
{ "body": "public static void createResources(String resourcesKey, OpenShiftAdapter adapter, Class<?> testClass, Properties properties) {\n try {\n final StringResolver resolver = Strings.createStringResolver(properties);\n\n List<OpenShiftDynamicImageStreamResource> openShiftDynamicImage...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_84
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_convert_short_to_long(){\n assertThat(convertToLong((short) 32767), is(32767L));\n }", "class_method_signature": "NumberConversionTest.should_be_convert_short_to_long()", "constructor": false, "full_signature": "@Test public void should_be_convert_short_to_l...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static long convertToLong(Object number) {\n long longNumber = 0;\n if (number != null) {\n NumberType type = NumberType.valueOf(number.getClass().getSimpleName().toUpperCase());\n\n switch (type) {\n case BYTE:\n longNumber = ((B...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_60
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "@Mock", "original_string": "@Mock\n CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" } ], "file": "docker/docker/src/test/java/org/arquillian/cube/d...
{ "body": "@Test(expected = UnsatisfiedRequirementException.class)\n public void testDockerMachineRequirementCheckNoMatchingNameFound() throws Exception {\n when(commandLineExecutor.execCommandAsArray(anyVararg())).thenReturn(Collections.emptyList());\n\n DockerMachineRequirement dockerMachineRequire...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" } ], "file": "docker/docker/src/main/java/org/arquil...
{ "body": "@Override\n public void check(RequiresDockerMachine context) throws UnsatisfiedRequirementException {\n String name = context.name();\n try {\n if (name != null && !name.isEmpty()) {\n List<String> machines =\n commandLineExecutor.execCommandAsA...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_116
{ "fields": [ { "declarator": "restoreSystemProperties = new RestoreSystemProperties()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();", "type": "RestoreSystemProperties", ...
{ "body": "@Test\n public void should_not_resolve_property_if_not_set_in_config_and_system_property() {\n // given\n final EnricherExpressionResolver resolver =\n new EnricherExpressionResolver(ConfigurationParameters.from(\"foo\", \"bar\"));\n\n // when\n final String resolv...
{ "fields": [ { "declarator": "configurationParameters", "modifier": "private", "original_string": "private ConfigurationParameters configurationParameters;", "type": "ConfigurationParameters", "var_name": "configurationParameters" } ], "file": "core/src/main/java/org/arquill...
{ "body": "public String resolve(String property) {\n final String replacedProperties = StringPropertyReplacer.replaceProperties(property);\n if (!property.equals(replacedProperties)) {\n return replacedProperties;\n } else {\n final Map<String, String> configParams = config...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_37
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/GitHubUtilTest.java", "identifier": "GitHubUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_download_docker_machine() throws IOException {\n HttpURLConnection connection = mock(HttpURLConnection.class);\n URL url = mockUrl(connection);\n String content = \"{\\\"id\\\":\\\"1\\\", \\\"name\\\":\\\"v0.5.5\\\", \\\"tag_name\\\":\\\"v0.5.5\\\"}\";\n ...
{ "fields": [ { "declarator": "DOCKER_MACHINE_LATEST_URL = \"https://api.github.com/repos/docker/machine/releases/latest\"", "modifier": "private static final", "original_string": "private static final String DOCKER_MACHINE_LATEST_URL = \"https://api.github.com/repos/docker/machine/releases/late...
{ "body": "public static LatestRepository consumeHttp(URL url) {\n try {\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n ObjectMapper mapper = new ObjectMapper();\n LatestRepository latestRepository...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_21
{ "fields": [], "file": "docker/junit5/src/test/java/org/arquillian/cube/docker/junit5/ContainerDslTest.java", "identifier": "ContainerDslTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_create_image_id_from_image_name_with_version_chars() {\n\n // given\n ContainerDsl containerDsl = new ContainerDsl(\"fedora:10\");\n\n // when\n final Container container = containerDsl.buildContainer();\n\n // then\n assertThat(contai...
{ "fields": [ { "declarator": "containerBuilder", "modifier": "private final", "original_string": "private final ContainerBuilder.ContainerOptionsBuilder containerBuilder;", "type": "ContainerBuilder.ContainerOptionsBuilder", "var_name": "containerBuilder" }, { "declara...
{ "body": "Container buildContainer() {\n this.container = containerBuilder.build();\n return this.container;\n }", "class_method_signature": "ContainerDsl.buildContainer()", "constructor": false, "full_signature": " Container buildContainer()", "identifier": "buildContainer", "invocations"...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_99
{ "fields": [ { "declarator": "SIMPLE_SCENARIO =\n \"helloworld:\\n\" +\n \" image: dockercloud/hello-world\\n\" +\n \" portBindings: [8080->80/tcp]\"", "modifier": "private static final", "original_string": "private static final String SIMPLE_SCENARIO =\n \...
{ "body": "@Test\n public void should_autoresolve_base_uri() {\n RestAssuredCustomizer restAssuredCustomizer = new RestAssuredCustomizer();\n Map<String, String> conf = new HashMap<>();\n\n final RestAssuredConfiguration restAssuredConfiguration = RestAssuredConfiguration.fromMap(conf);\n\n ...
{ "fields": [ { "declarator": "cubeDockerConfigurationInstance", "modifier": "@Inject", "original_string": "@Inject\n Instance<CubeDockerConfiguration> cubeDockerConfigurationInstance;", "type": "Instance<CubeDockerConfiguration>", "var_name": "cubeDockerConfigurationInstance" ...
{ "body": "void configureRequestSpecBuilder(@Observes RestAssuredConfiguration restAssuredConfiguration,\n CubeDockerConfiguration cubeDockerConfiguration, RequestSpecBuilder requestSpecBuilder) {\n if (restAssuredConfiguration.isBaseUriSet()) {\n requestSpecBuilder.setBaseUri(restAssuredConf...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_76
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Mock", "original_string": "@Mock\n CubeRegistry cubeRegistry;", "type": "CubeRegistry", "var_name": "cubeRegistry" }, { "declarator": "dockerCube", "modifier": "@Mock", "original_string": "@Mock\...
{ "body": "@Test\n public void should_unset_cube_properties() {\n\n //given\n\n SystemPropertiesCubeSetter systemPropertiesCubeSetter = new SystemPropertiesCubeSetter();\n\n System.setProperty(\"arq.cube.docker.image.ip\", \"192.168.99.100\");\n System.setProperty(\"arq.cube.docker.imag...
{ "fields": [ { "declarator": "PREFIX = \"arq.cube.docker\"", "modifier": "private static final", "original_string": "private static final String PREFIX = \"arq.cube.docker\";", "type": "String", "var_name": "PREFIX" } ], "file": "docker/docker/src/main/java/org/arquillian/cu...
{ "body": "public void removeCubeSystemProperties(@Observes AfterDestroy afterDestroy) {\n final Iterator<Map.Entry<Object, Object>> propertiesIterator = System.getProperties()\n .entrySet().iterator();\n\n String cubePrefix = String.format(\"%s.%s\", PREFIX, afterDestroy.getCubeId());\n\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_100
{ "fields": [ { "declarator": "SIMPLE_SCENARIO =\n \"helloworld:\\n\" +\n \" image: dockercloud/hello-world\\n\" +\n \" portBindings: [8080->80/tcp]\"", "modifier": "private static final", "original_string": "private static final String SIMPLE_SCENARIO =\n \...
{ "body": "@Test\n public void should_autoresolve_base_uri_with_schema_if_set() {\n RestAssuredCustomizer restAssuredCustomizer = new RestAssuredCustomizer();\n\n Map<String, String> conf = new HashMap<>();\n conf.put(\"schema\", \"https\");\n\n final RestAssuredConfiguration restAssure...
{ "fields": [ { "declarator": "cubeDockerConfigurationInstance", "modifier": "@Inject", "original_string": "@Inject\n Instance<CubeDockerConfiguration> cubeDockerConfigurationInstance;", "type": "Instance<CubeDockerConfiguration>", "var_name": "cubeDockerConfigurationInstance" ...
{ "body": "void configureRequestSpecBuilder(@Observes RestAssuredConfiguration restAssuredConfiguration,\n CubeDockerConfiguration cubeDockerConfiguration, RequestSpecBuilder requestSpecBuilder) {\n if (restAssuredConfiguration.isBaseUriSet()) {\n requestSpecBuilder.setBaseUri(restAssuredConf...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_83
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_convert_byte_to_long(){\n assertThat(convertToLong((byte)127), is(127L));\n }", "class_method_signature": "NumberConversionTest.should_be_convert_byte_to_long()", "constructor": false, "full_signature": "@Test public void should_be_convert_byte_to_long()", ...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static long convertToLong(Object number) {\n long longNumber = 0;\n if (number != null) {\n NumberType type = NumberType.valueOf(number.getClass().getSimpleName().toUpperCase());\n\n switch (type) {\n case BYTE:\n longNumber = ((B...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_7
{ "fields": [ { "declarator": "istioClient", "modifier": "@Mock\n private", "original_string": "@Mock\n private IstioClient istioClient;", "type": "IstioClient", "var_name": "istioClient" }, { "declarator": "istioResource", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void should_load_route_from_url() throws IOException {\n\n // given\n final IstioAssistant istioAssistant = new IstioAssistant(istioClient);\n\n // when\n final URL resource =\n Thread.currentThread().getContextClassLoader().getResource(\"route-rule-...
{ "fields": [ { "declarator": "istioClient", "modifier": "private final", "original_string": "private final IstioClient istioClient;", "type": "IstioClient", "var_name": "istioClient" }, { "declarator": "httpClient", "modifier": "private final", "original_st...
{ "body": "public List<IstioResource> deployIstioResources(final InputStream inputStream) {\n return istioClient.registerCustomResources(inputStream);\n }", "class_method_signature": "IstioAssistant.deployIstioResources(final InputStream inputStream)", "constructor": false, "full_signature": "public L...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_95
{ "fields": [ { "declarator": "TEN_MEGABYTES = 9999800L", "modifier": "private static final", "original_string": "private static final Long TEN_MEGABYTES = 9999800L;", "type": "Long", "var_name": "TEN_MEGABYTES" }, { "declarator": "ONE_KIKIBYTE = 1024L", "modifier...
{ "body": "@Test\n public void should_be_possible_to_show_negative_kikibytes_in_human_readable_form(){\n assertThat(humanReadableByteCount(NEGATIVE_ONE_KIKIBYTE, false), is(\"- 1.00 KiB\"));\n }", "class_method_signature": "NumberConversionTest.should_be_possible_to_show_negative_kikibytes_in_human_rea...
{ "fields": [], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/utils/NumberConversion.java", "identifier": "NumberConversion", "interfaces": "", "methods": [ { "class_method_signature": "NumberConversion.humanReadableByteCount(Long bytes, boolean decimal)", "cons...
{ "body": "public static String humanReadableByteCount(Long bytes, boolean decimal) {\n if (bytes == null) bytes = 0L;\n String sign = bytes < 0 ? \"-\" : \"\";\n Long absBytes = Math.abs(bytes);\n int unit = decimal ? 1000 : 1024;\n if (absBytes < unit) {\n return sign +...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_120
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test\n public void shouldStartWithCubeIdString() {\n controllerInst.get().start(CUBE_ID);\n assertEventFired(StartCube.class, 1);\n }", "class_method_signature": "ClientCubeControllerTest.shouldStartWithCubeIdString()", "constructor": false, "full_signature": "@Test public void s...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void start(CubeID cubeId) {\n start(cubeId.get());\n }", "class_method_signature": "ClientCubeController.start(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void start(CubeID cubeId)", "identifier": "start", "invocations": [ "start"...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_56
{ "fields": [ { "declarator": "ID = \"test\"", "modifier": "private static final", "original_string": "private static final String ID = \"test\";", "type": "String", "var_name": "ID" }, { "declarator": "executor", "modifier": "@Mock\n private", "original_...
{ "body": "@Test\n public void shouldFireLifecycleEventsDuringStop() {\n cube.stop();\n assertEventFired(BeforeStop.class, 1);\n assertEventFired(AfterStop.class, 1);\n }", "class_method_signature": "DockerCubeTest.shouldFireLifecycleEventsDuringStop()", "constructor": false, "full_si...
{ "fields": [ { "declarator": "log = Logger.getLogger(DockerCube.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(DockerCube.class.getName());", "type": "Logger", "var_name": "log" }, { "declar...
{ "body": "@Override\n public void stop() throws CubeControlException {\n if (state == State.STOPPED || state == State.PRE_RUNNING || state == State.DESTROYED) {\n return;\n }\n try {\n lifecycle.fire(new BeforeStop(id));\n\n long currentTime = System.currentTi...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_40
{ "fields": [ { "declarator": "folder = new TemporaryFolder()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TemporaryFolder folder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "folder" } ], "file": "docker/docker/src...
{ "body": "@Test\n public void shouldCopyDockerfileFromJarLocation() throws IOException, ClassNotFoundException {\n\n //Creates a jar file with required content\n JavaArchive jar = ShrinkWrap.create(JavaArchive.class)\n .addClass(CustomTestJarDockerfiler.class)\n .addClasses(Cub...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/DockerFileUtil.java", "identifier": "DockerFileUtil", "interfaces": "", "methods": [ { "class_method_signature": "DockerFileUtil.DockerFileUtil()", "constructor": true, "full_signature": "private D...
{ "body": "public static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output)\n throws IOException {\n if (cubeDockerFile == null) {\n throw new IllegalArgumentException(\"No CubeDockerFile annotation is provided\");\n }\n\n String d...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_17
{ "fields": [ { "declarator": "server = new KubernetesMockServer()", "modifier": "private static final", "original_string": "private static final KubernetesMockServer server = new KubernetesMockServer();", "type": "KubernetesMockServer", "var_name": "server" }, { "decla...
{ "body": "@Test\n public void should_report_environment_configuration_file_from_default_location() throws IOException {\n //given\n Configuration configuration = getConfiguration();\n TakeKubernetesResourcesInformation takeKubernetesResourcesInformation = new TakeKubernetesResourcesInformatio...
{ "fields": [ { "declarator": "sectionEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<SectionEvent> sectionEvent;", "type": "Event<SectionEvent>", "var_name": "sectionEvent" }, { "declarator": "dependencyResolver", "modifier": "@Inject", ...
{ "body": "public void reportKubernetesConfiguration(@Observes Start start, Configuration configuration,\n org.arquillian.reporter.config.ReporterConfiguration reporterConfiguration) throws IOException {\n final ReportBuilder reportBuilder = Reporter.createReport(CONFIGURATION);\n Session session...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_16
{ "fields": [ { "declarator": "server = new KubernetesMockServer()", "modifier": "private static final", "original_string": "private static final KubernetesMockServer server = new KubernetesMockServer();", "type": "KubernetesMockServer", "var_name": "server" }, { "decla...
{ "body": "@Test\n public void should_report_environment_configuration_file_from_test_resources() throws IOException {\n //given\n Configuration configuration = DefaultConfiguration.fromMap(addEnvironmentConfigUrl(getConfig(), FILE_NAME));\n TakeKubernetesResourcesInformation takeKubernetesRes...
{ "fields": [ { "declarator": "sectionEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<SectionEvent> sectionEvent;", "type": "Event<SectionEvent>", "var_name": "sectionEvent" }, { "declarator": "dependencyResolver", "modifier": "@Inject", ...
{ "body": "public void reportKubernetesConfiguration(@Observes Start start, Configuration configuration,\n org.arquillian.reporter.config.ReporterConfiguration reporterConfiguration) throws IOException {\n final ReportBuilder reportBuilder = Reporter.createReport(CONFIGURATION);\n Session session...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_41
{ "fields": [ { "declarator": "originalHome = System.getProperty(\"user.home\")", "modifier": "private", "original_string": "private String originalHome = System.getProperty(\"user.home\");", "type": "String", "var_name": "originalHome" } ], "file": "docker/docker/src/test/ja...
{ "body": "@Test\n public void shouldResolveTildeCharacterToHome() {\n System.setProperty(\"user.home\", \"/home/arquillian\");\n String resolvedPath = HomeResolverUtil.resolveHomeDirectoryChar(\"~/certs\");\n assertThat(resolvedPath, is(\"/home/arquillian/certs\"));\n }", "class_method_s...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/HomeResolverUtil.java", "identifier": "HomeResolverUtil", "interfaces": "", "methods": [ { "class_method_signature": "HomeResolverUtil.resolveHomeDirectoryChar(String path)", "constructor": false, "...
{ "body": "public static String resolveHomeDirectoryChar(String path) {\n if (path.startsWith(\"~\")) {\n return path.replace(\"~\", System.getProperty(\"user.home\"));\n }\n return path;\n }", "class_method_signature": "HomeResolverUtil.resolveHomeDirectoryChar(String path)", "...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_57
{ "fields": [ { "declarator": "ID = \"test\"", "modifier": "private static final", "original_string": "private static final String ID = \"test\";", "type": "String", "var_name": "ID" }, { "declarator": "executor", "modifier": "@Mock\n private", "original_...
{ "body": "@Test\n public void shouldFireLifecycleEventsDuringStopWhenContainerNotFound() {\n doThrow(new NotFoundException(\"container not found\"))\n .when(executor).stopContainer(ID);\n cube.stop();\n assertEventFired(BeforeStop.class, 1);\n assertEventFired(AfterStop.clas...
{ "fields": [ { "declarator": "log = Logger.getLogger(DockerCube.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(DockerCube.class.getName());", "type": "Logger", "var_name": "log" }, { "declar...
{ "body": "@Override\n public void stop() throws CubeControlException {\n if (state == State.STOPPED || state == State.PRE_RUNNING || state == State.DESTROYED) {\n return;\n }\n try {\n lifecycle.fire(new BeforeStop(id));\n\n long currentTime = System.currentTi...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_121
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test\n public void shouldStopWithCubeID() {\n controllerInst.get().stop(new CubeID(CUBE_ID));\n assertEventFired(StopCube.class, 1);\n }", "class_method_signature": "ClientCubeControllerTest.shouldStopWithCubeID()", "constructor": false, "full_signature": "@Test public void shoul...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void stop(CubeID cubeId) {\n stop(cubeId.get());\n }", "class_method_signature": "ClientCubeController.stop(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void stop(CubeID cubeId)", "identifier": "stop", "invocations": [ "stop", ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }