Questions tagged [picocontainer]

PicoContainer is a highly embeddable, full-service, Inversion of Control (IoC) container for components honor the Dependency Injection pattern

PicoContainer

PicoContainer is a highly embeddable, full-service, Inversion of Control (IoC) container for components honor the Dependency Injection pattern. The project started in 2003 and pioneered Constructor Injection auto-wiring. It is also Open Source and therefore free to use. The license is BSD and thus you can safely use this with commercial or other open source software.

PicoContainer 2.14 is the Latest Released Version, and the download is disponible here. The project is hosted in http://picocontainer.codehaus.org/.

75 questions
107
votes
6 answers

Google Guice vs. PicoContainer for Dependency Injection

My team is researching dependency injection frameworks and is trying to decide between using Google-Guice and PicoContainer. We are looking for several things in our framework: A small code footprint - What I mean by a small code footprint is we…
austen
  • 3,314
  • 3
  • 25
  • 26
6
votes
1 answer

How to share describe() block in Cypress.io across various files, similar to Mocha's 'Shared Behaviour' facility

I am working on a Web-test automation framework, and would like to few functionalities present in describe() block in one cypress ..spec.js file, by methods present in another in another cypress ..spec.js file? Kindly read about Shared Behaviour…
user2451016
  • 1,857
  • 3
  • 20
  • 44
6
votes
6 answers

Project doesn't recognize cucumber-picocontainer dependency

I'm currently working on a java test framework with cucumber, JUnit and Selenium. I've already worked on projects like that, but I'm experiencing an issue on this one. I'm trying to create a Context class that is a Singleton. I want to use…
Nicolas G. Duvivier
  • 498
  • 1
  • 6
  • 18
4
votes
1 answer

Why am I getting an ArrayIndexOutOfBoundsException running this particular Cucumber step in Kotlin?

I'm running with a Cucumber JVM feature file, using Java8 and PicoContainer. I've stripped these steps right down so they're empty, and I'm still getting an error. Here's my feature: Feature: Full Journey Scenario: Can load a typical JIRA csv and…
Lunivore
  • 17,277
  • 4
  • 47
  • 92
4
votes
1 answer

Passing variables between Cucumber step definitions

In Cucumber, how do i go about passing variables between step definition classes. Im trying to implement in Scala. Looking around I have seen people suggest using Guice or Picocontainer or any other DI framework. But have not really come across an…
nixgadget
  • 6,983
  • 16
  • 70
  • 103
3
votes
3 answers

How do I manage dynamic dependencies with PicoContainer?

Say I have two classes A and B, with B depending on A. public class A {} public class B { public B(A a) {} } It's easy to resolve B in a single PicoContainer. final MutablePicoContainer root = new PicoBuilder().build(); …
Ronald Blaschke
  • 4,036
  • 2
  • 22
  • 16
3
votes
2 answers

Dependency Injection - Cucumber Pico Container

I am having difficulty understanding and utilizing dependency injection in my situation. I want to use Pico-container (https://cucumber.io/blog/2015/07/08/polymorphic-step-definitions). This is my situation...I currently have one step definition…
snikt
  • 581
  • 4
  • 11
  • 27
3
votes
1 answer

Pico container exception: org.picocontainer.injectors.AbstractInjector$UnsatisfiableDependenciesException:?

I seem to be getting a pico container exception: org.picocontainer.injectors.AbstractInjector$UnsatisfiableDependenciesException. My code is as follows: Page Object representing a specific page of a website: public class GooglePage { …
Gbru
  • 1,065
  • 3
  • 24
  • 56
3
votes
2 answers

Controlling the order of PicoContainer startup

I have been tasked with doing some refactoring work on how we start up applications. Basically we have a bunch of console apps which were depending on the GUI application startup code, causing bogus dependencies which have kick-on effects for which…
Hakanai
  • 12,010
  • 10
  • 62
  • 132
3
votes
1 answer

Dependency injection: how to use/implement PicoContainer Framework in R

Questions General question How would you go about starting to implement the PicoContainer-Framework in R? Specific question How would the "pico registry (mechanism)" actually look like? I came up with a "poor man's version" that only works for a…
Rappster
  • 12,762
  • 7
  • 71
  • 120
3
votes
1 answer

How to register decorated objects in Dependency Injection frameworks (PicoContainer)?

I want to wrap a number of classes implementing the Job interface with a JobEnabledDecorator object that determines whether or not it executes. I am having trouble figuring out how to configure this in PicoContainer, so that it knows to create the…
2
votes
4 answers

Benefits of implementation driven & dependency injection vs cost of maintaining implementations

I am starting an application that I would like to build quickly and will be later developed by 20+ developers. Knowing what you know about DI in an environment with multiple developers, would you go with DI for a new application you'd like to build…
MetaChrome
  • 3,210
  • 6
  • 31
  • 48
2
votes
1 answer

How to configure PicoContainer in Cucumber?

I would like to manually configure my picocontainer to have configured instances of configuration objects for my cucumber build. I.E, providing configuration objects a-la @ConfigurationProperties in Spring. However, it is not clear how to do so.…
Snappawapa
  • 1,697
  • 3
  • 20
  • 42
2
votes
0 answers

Error org.picocontainer.PicoCompositionException: Duplicate Keys not allowed. Duplicate

I was trying to achieve, Cucumber feature level parallel execution using pico Container. When I am using a shared Driver in a context Class as below, I get org.picocontainer.PicoCompositionException: Duplicate Keys not allowed. Duplicate public…
2
votes
1 answer

Cucumber, Java Picocontainer / Constructor injection: TestContext & ScenarioContext), how to share multiple data between multiple step definitions

Problem: How to share multiple variable /data between multiple step definitions along with state(if required) using Construction injection, dependent injection / Picocontainer. Background: We had a very big step definition and it was getting…
Niks
  • 85
  • 6
1
2 3 4 5