File tree Expand file tree Collapse file tree 2 files changed +0
-6
lines changed Expand file tree Collapse file tree 2 files changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,6 @@ def migrate_imports(content):
114
114
# refer to migrate_guice_annotation
115
115
if '@Guice' in content_new and '@BeforeAll' not in content_new :
116
116
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;' )
119
117
120
118
content_new = re .sub ('org.junit.jupiter.api.Test;' , '\n ' .join (imports ), content_new )
121
119
@@ -417,7 +415,6 @@ def migrate_guice_annotation(content):
417
415
or 'public abstract class' in line ):
418
416
left_spaces = ' ' * (len (line ) - len (line .lstrip ()))
419
417
new_content .append (left_spaces + '@TestInstance(Lifecycle.PER_CLASS)' )
420
- new_content .append (left_spaces + '@ExtendWith(GuiceInjectionExtension.class)' )
421
418
new_content .append (line )
422
419
423
420
if '{' in line :
Original file line number Diff line number Diff line change 18
18
expected_1 = """
19
19
20
20
@TestInstance(Lifecycle.PER_CLASS)
21
- @ExtendWith(GuiceInjectionExtension.class)
22
21
public class SomeTest {
23
22
24
23
private final Injector injector = Guice.createInjector(new SomeModule());
46
45
expected_2 = """
47
46
48
47
@TestInstance(Lifecycle.PER_CLASS)
49
- @ExtendWith(GuiceInjectionExtension.class)
50
48
public class SomeTest {
51
49
52
50
private final Injector injector = Guice.createInjector();
75
73
expected_3 = """
76
74
77
75
@TestInstance(Lifecycle.PER_CLASS)
78
- @ExtendWith(GuiceInjectionExtension.class)
79
76
public class SomeTest {
80
77
81
78
private final Injector injector = Guice.createInjector(new TestModuleA(), new Test.ModuleB());
You can’t perform that action at this time.
0 commit comments