Skip to content

Commit b5417d9

Browse files
committed
remove GuiceInjectionExtension
1 parent 2aad806 commit b5417d9

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

scripts/testng-junit/src/testng2junit5.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ def migrate_imports(content):
114114
# refer to migrate_guice_annotation
115115
if '@Guice' in content_new and '@BeforeAll' not in content_new:
116116
imports.append('import org.junit.jupiter.api.BeforeAll;')
117-
imports.append('import org.junit.jupiter.api.extension.ExtendWith;')
118-
imports.append('import com.addepar.infra.library.testing.extention.GuiceInjectionExtension;')
119117

120118
content_new = re.sub('org.junit.jupiter.api.Test;', '\n'.join(imports), content_new)
121119

@@ -417,7 +415,6 @@ def migrate_guice_annotation(content):
417415
or 'public abstract class' in line):
418416
left_spaces = ' ' * (len(line) - len(line.lstrip()))
419417
new_content.append(left_spaces + '@TestInstance(Lifecycle.PER_CLASS)')
420-
new_content.append(left_spaces + '@ExtendWith(GuiceInjectionExtension.class)')
421418
new_content.append(line)
422419

423420
if '{' in line:

scripts/testng-junit/src/tests/test_migrate_guice_annotation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
expected_1 = """
1919
2020
@TestInstance(Lifecycle.PER_CLASS)
21-
@ExtendWith(GuiceInjectionExtension.class)
2221
public class SomeTest {
2322
2423
private final Injector injector = Guice.createInjector(new SomeModule());
@@ -46,7 +45,6 @@
4645
expected_2 = """
4746
4847
@TestInstance(Lifecycle.PER_CLASS)
49-
@ExtendWith(GuiceInjectionExtension.class)
5048
public class SomeTest {
5149
5250
private final Injector injector = Guice.createInjector();
@@ -75,7 +73,6 @@
7573
expected_3 = """
7674
7775
@TestInstance(Lifecycle.PER_CLASS)
78-
@ExtendWith(GuiceInjectionExtension.class)
7976
public class SomeTest {
8077
8178
private final Injector injector = Guice.createInjector(new TestModuleA(), new Test.ModuleB());

0 commit comments

Comments
 (0)