{"id":77256,"library":"guice-testlib","title":"Guice Testlib","description":"Guice is a lightweight dependency injection framework for Java 8 and above, providing test utilities for dependency injection.","status":"active","version":"7.0.0","language":"java","source_language":null,"source_url":"https://github.com/google/guice","tags":["dependency-injection","testing","guice","junit"],"install":[{"cmd":"<dependency>\n  <groupId>com.google.inject.extensions</groupId>\n  <artifactId>guice-testlib</artifactId>\n  <version>7.0.0</version>\n</dependency>","lang":"xml","label":"Maven"},{"cmd":"implementation 'com.google.inject.extensions:guice-testlib:7.0.0'","lang":"groovy","label":"Gradle"}],"dependencies":[],"imports":[{"symbol":"GuiceRule","correct":"com.google.inject.testing.guice.GuiceRule"}],"quickstart":{"code":"import com.google.inject.testing.guice.GuiceRule;\nimport org.junit.Rule;\nimport org.junit.Test;\n\npublic class ExampleTest {\n    @Rule\n    public GuiceRule guiceRule = new GuiceRule(new MyModule());\n\n    @Test\n    public void testInjection() {\n        // Test logic\n    }\n}","lang":"java","description":"Minimal JUnit test using GuiceRule for dependency injection."},"warnings":[{"fix":"Upgrade to Java 11+ or use an older Guice version (e.g., 5.x) for Java 8.","message":"Guice 7.0.0 requires Java 11 or later.","severity":"breaking","affected_versions":">=7.0.0"}],"env_vars":null,"search_vec":"'8':12 'depend':7,19,22 'dependency-inject':21 'framework':9 'guic':1,3,25 'inject':8,20,23 'java':11 'junit':26 'lightweight':6 'provid':15 'test':16,24 'testlib':2 'util':17","created_at":"2026-06-17T19:53:09.048968+00:00","updated_at":"2026-06-17T19:53:09.048968+00:00","problems":[],"ecosystem":"maven","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/google/guice","github":"https://github.com/google/guice","docs":"https://appdoc.app/artifact/com.google.inject.extensions/guice-testlib/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","dependency-injection"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}