1
|
|
package fi.eis.libraries.di; |
2
|
|
|
3
|
|
import java.io.File; |
4
|
|
import java.util.List; |
5
|
|
import java.util.Map; |
6
|
|
|
7
|
|
import fi.eis.libraries.di.SimpleLogger.LogLevel; |
8
|
|
|
9
|
|
/** |
10
|
|
* Creation Date: 30.11.2014 |
11
|
|
* Creation Time: 22:54 |
12
|
|
* |
13
|
|
* @author eis |
14
|
|
*/ |
15
|
|
public class DependencyInjection { |
16
|
|
public static Module classes(Class... classes) { |
17
|
3
1. classes : removed call to fi/eis/libraries/di/Module::<init> → KILLED
2. classes : replaced return value with null for fi/eis/libraries/di/DependencyInjection::classes → KILLED
3. classes : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::classes to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
return new Module(classes); |
18
|
|
} |
19
|
|
public static Module classes(List<Class> classes) { |
20
|
3
1. classes : removed call to fi/eis/libraries/di/Module::<init> → KILLED
2. classes : replaced return value with null for fi/eis/libraries/di/DependencyInjection::classes → KILLED
3. classes : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::classes to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
return new Module(classes); |
21
|
|
} |
22
|
|
public static Module classesWithInstances(Map<Class,Object> classesWithInstaces) { |
23
|
3
1. classesWithInstances : removed call to fi/eis/libraries/di/Module::<init> → KILLED
2. classesWithInstances : replaced return value with null for fi/eis/libraries/di/DependencyInjection::classesWithInstances → KILLED
3. classesWithInstances : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::classesWithInstances to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
return new Module(classesWithInstaces); |
24
|
|
} |
25
|
|
public static Context context(Module... modules) { |
26
|
|
// add all other modules to combined one |
27
|
6
1. context : removed call to fi/eis/libraries/di/Module::<init> → KILLED
2. context : Substituted 0 with 1 → KILLED
3. context : Substituted 0 with 1 → KILLED
4. context : Substituted 0 with -1 → KILLED
5. context : Substituted 0 with 1 → KILLED
6. context : Substituted 0 with -1 → KILLED
|
Module combinedModule = new Module(); |
28
|
15
1. context : Decremented (a--) integer local variable number 4 → TIMED_OUT
2. context : Negated integer local variable number 4 → KILLED
3. context : Negated integer local variable number 3 → KILLED
4. context : Negated integer local variable number 4 → KILLED
5. context : Incremented (a++) integer local variable number 4 → KILLED
6. context : Incremented (a++) integer local variable number 3 → KILLED
7. context : Incremented (a++) integer local variable number 4 → KILLED
8. context : Decremented (a--) integer local variable number 4 → KILLED
9. context : Decremented (a--) integer local variable number 3 → KILLED
10. context : Incremented (++a) integer local variable number 4 → KILLED
11. context : Incremented (++a) integer local variable number 3 → KILLED
12. context : Incremented (++a) integer local variable number 4 → KILLED
13. context : Decremented (--a) integer local variable number 4 → KILLED
14. context : Decremented (--a) integer local variable number 3 → KILLED
15. context : Decremented (--a) integer local variable number 4 → KILLED
|
for (Module module: modules) { |
29
|
1
1. context : removed call to fi/eis/libraries/di/Module::add → KILLED
|
combinedModule.add(module); |
30
|
|
} |
31
|
|
// create a new module based on combined one |
32
|
14
1. context : Substituted 1 with 2 → SURVIVED
2. context : removed call to fi/eis/libraries/di/Context::<init> → KILLED
3. context : Substituted 1 with 0 → KILLED
4. context : Substituted 0 with 1 → KILLED
5. context : replaced return value with null for fi/eis/libraries/di/DependencyInjection::context → KILLED
6. context : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::context to ( if (x != null) null else throw new RuntimeException ) → KILLED
7. context : Substituted 0 with 1 → KILLED
8. context : Substituted 1 with 0 → KILLED
9. context : Substituted 1 with -1 → KILLED
10. context : Substituted 0 with -1 → KILLED
11. context : Substituted 1 with -1 → KILLED
12. context : Substituted 0 with 1 → KILLED
13. context : Substituted 1 with 0 → KILLED
14. context : Substituted 0 with -1 → KILLED
|
return new Context(combinedModule); |
33
|
|
} |
34
|
|
|
35
|
|
public static Context deploymentUnitContext(Class sourceClass) { |
36
|
3
1. deploymentUnitContext : removed call to fi/eis/libraries/di/DeploymentUnitContext::<init> → KILLED
2. deploymentUnitContext : replaced return value with null for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext → KILLED
3. deploymentUnitContext : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
return new DeploymentUnitContext(sourceClass); |
37
|
|
} |
38
|
|
public static Context deploymentUnitContext(File jarFile) { |
39
|
3
1. deploymentUnitContext : removed call to fi/eis/libraries/di/DeploymentUnitContext::<init> → KILLED
2. deploymentUnitContext : replaced return value with null for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext → KILLED
3. deploymentUnitContext : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
return new DeploymentUnitContext(jarFile); |
40
|
|
} |
41
|
|
public static Context deploymentUnitContext(Class sourceClass, LogLevel logLevel) { |
42
|
3
1. deploymentUnitContext : removed call to fi/eis/libraries/di/DeploymentUnitContext::<init> → KILLED
2. deploymentUnitContext : replaced return value with null for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext → KILLED
3. deploymentUnitContext : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
return new DeploymentUnitContext(sourceClass, logLevel); |
43
|
|
} |
44
|
|
public static Context deploymentUnitContext(File jarFile, LogLevel logLevel) { |
45
|
3
1. deploymentUnitContext : removed call to fi/eis/libraries/di/DeploymentUnitContext::<init> → NO_COVERAGE
2. deploymentUnitContext : replaced return value with null for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext → NO_COVERAGE
3. deploymentUnitContext : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
|
return new DeploymentUnitContext(jarFile, logLevel); |
46
|
|
} |
47
|
|
|
48
|
|
public static Context configurationClasses(Class... exampleJavaConfigClass) { |
49
|
3
1. configurationClasses : removed call to fi/eis/libraries/di/ConfigurationClassContext::<init> → NO_COVERAGE
2. configurationClasses : replaced return value with null for fi/eis/libraries/di/DependencyInjection::configurationClasses → NO_COVERAGE
3. configurationClasses : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::configurationClasses to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
|
return new ConfigurationClassContext(exampleJavaConfigClass); |
50
|
|
} |
51
|
|
public static Context configurationClasses(LogLevel logLevel, Class... exampleJavaConfigClass) { |
52
|
3
1. configurationClasses : removed call to fi/eis/libraries/di/ConfigurationClassContext::<init> → KILLED
2. configurationClasses : replaced return value with null for fi/eis/libraries/di/DependencyInjection::configurationClasses → KILLED
3. configurationClasses : mutated return of Object value for fi/eis/libraries/di/DependencyInjection::configurationClasses to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
return new ConfigurationClassContext(logLevel, exampleJavaConfigClass); |
53
|
|
} |
54
|
|
} |
| | Mutations |
17 |
|
1.1 Location : classes Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) removed call to fi/eis/libraries/di/Module::<init> → KILLED 2.2 Location : classes Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) replaced return value with null for fi/eis/libraries/di/DependencyInjection::classes → KILLED 3.3 Location : classes Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) mutated return of Object value for fi/eis/libraries/di/DependencyInjection::classes to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
20 |
|
1.1 Location : classes Killed by : fi.eis.libraries.di.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.DIClassScanningTest) removed call to fi/eis/libraries/di/Module::<init> → KILLED 2.2 Location : classes Killed by : fi.eis.libraries.di.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.DIClassScanningTest) replaced return value with null for fi/eis/libraries/di/DependencyInjection::classes → KILLED 3.3 Location : classes Killed by : fi.eis.libraries.di.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.DIClassScanningTest) mutated return of Object value for fi/eis/libraries/di/DependencyInjection::classes to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
23 |
|
1.1 Location : classesWithInstances Killed by : fi.eis.libraries.di.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.JavaConfigTest) removed call to fi/eis/libraries/di/Module::<init> → KILLED 2.2 Location : classesWithInstances Killed by : fi.eis.libraries.di.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.JavaConfigTest) replaced return value with null for fi/eis/libraries/di/DependencyInjection::classesWithInstances → KILLED 3.3 Location : classesWithInstances Killed by : fi.eis.libraries.di.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.JavaConfigTest) mutated return of Object value for fi/eis/libraries/di/DependencyInjection::classesWithInstances to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
27 |
|
1.1 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) removed call to fi/eis/libraries/di/Module::<init> → KILLED 2.2 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with 1 → KILLED 3.3 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with 1 → KILLED 4.4 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with -1 → KILLED 5.5 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with 1 → KILLED 6.6 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with -1 → KILLED
|
28 |
|
1.1 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Negated integer local variable number 4 → KILLED 2.2 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Negated integer local variable number 3 → KILLED 3.3 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Negated integer local variable number 4 → KILLED 4.4 Location : context Killed by : fi.eis.libraries.di.DIInheritanceTest.testDi(fi.eis.libraries.di.DIInheritanceTest) Incremented (a++) integer local variable number 4 → KILLED 5.5 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Incremented (a++) integer local variable number 3 → KILLED 6.6 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Incremented (a++) integer local variable number 4 → KILLED 7.7 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Decremented (a--) integer local variable number 4 → KILLED 8.8 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Decremented (a--) integer local variable number 3 → KILLED 9.9 Location : context Killed by : none Decremented (a--) integer local variable number 4 → TIMED_OUT 10.10 Location : context Killed by : fi.eis.libraries.di.DIInheritanceTest.testDi(fi.eis.libraries.di.DIInheritanceTest) Incremented (++a) integer local variable number 4 → KILLED 11.11 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Incremented (++a) integer local variable number 3 → KILLED 12.12 Location : context Killed by : fi.eis.libraries.di.DIInheritanceTest.testDi(fi.eis.libraries.di.DIInheritanceTest) Incremented (++a) integer local variable number 4 → KILLED 13.13 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Decremented (--a) integer local variable number 4 → KILLED 14.14 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Decremented (--a) integer local variable number 3 → KILLED 15.15 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Decremented (--a) integer local variable number 4 → KILLED
|
29 |
|
1.1 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) removed call to fi/eis/libraries/di/Module::add → KILLED
|
32 |
|
1.1 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) removed call to fi/eis/libraries/di/Context::<init> → KILLED 2.2 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 1 with 0 → KILLED 3.3 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with 1 → KILLED 4.4 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) replaced return value with null for fi/eis/libraries/di/DependencyInjection::context → KILLED 5.5 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) mutated return of Object value for fi/eis/libraries/di/DependencyInjection::context to ( if (x != null) null else throw new RuntimeException ) → KILLED 6.6 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with 1 → KILLED 7.7 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 1 with 0 → KILLED 8.8 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 1 with -1 → KILLED 9.9 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with -1 → KILLED 10.10 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 1 with -1 → KILLED 11.11 Location : context Killed by : none Substituted 1 with 2 → SURVIVED 12.12 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with 1 → KILLED 13.13 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 1 with 0 → KILLED 14.14 Location : context Killed by : fi.eis.libraries.di.DIConstructorTest.testDi(fi.eis.libraries.di.DIConstructorTest) Substituted 0 with -1 → KILLED
|
36 |
|
1.1 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningTest.testDi(fi.eis.libraries.di.DIClassScanningTest) removed call to fi/eis/libraries/di/DeploymentUnitContext::<init> → KILLED 2.2 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningTest.testDi(fi.eis.libraries.di.DIClassScanningTest) replaced return value with null for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext → KILLED 3.3 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningTest.testDi(fi.eis.libraries.di.DIClassScanningTest) mutated return of Object value for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
39 |
|
1.1 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningJarLoadingTest.testDiWithNonExistingFile(fi.eis.libraries.di.DIClassScanningJarLoadingTest) removed call to fi/eis/libraries/di/DeploymentUnitContext::<init> → KILLED 2.2 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.DIClassScanningJarLoadingTest) replaced return value with null for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext → KILLED 3.3 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.DIClassScanningJarLoadingTest) mutated return of Object value for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
42 |
|
1.1 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.DIClassScanningTest) removed call to fi/eis/libraries/di/DeploymentUnitContext::<init> → KILLED 2.2 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.DIClassScanningTest) replaced return value with null for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext → KILLED 3.3 Location : deploymentUnitContext Killed by : fi.eis.libraries.di.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.DIClassScanningTest) mutated return of Object value for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext to ( if (x != null) null else throw new RuntimeException ) → KILLED
|
45 |
|
1.1 Location : deploymentUnitContext Killed by : none removed call to fi/eis/libraries/di/DeploymentUnitContext::<init> → NO_COVERAGE 2.2 Location : deploymentUnitContext Killed by : none replaced return value with null for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext → NO_COVERAGE 3.3 Location : deploymentUnitContext Killed by : none mutated return of Object value for fi/eis/libraries/di/DependencyInjection::deploymentUnitContext to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
|
49 |
|
1.1 Location : configurationClasses Killed by : none removed call to fi/eis/libraries/di/ConfigurationClassContext::<init> → NO_COVERAGE 2.2 Location : configurationClasses Killed by : none replaced return value with null for fi/eis/libraries/di/DependencyInjection::configurationClasses → NO_COVERAGE 3.3 Location : configurationClasses Killed by : none mutated return of Object value for fi/eis/libraries/di/DependencyInjection::configurationClasses to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
|
52 |
|
1.1 Location : configurationClasses Killed by : fi.eis.libraries.di.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.JavaConfigTest) removed call to fi/eis/libraries/di/ConfigurationClassContext::<init> → KILLED 2.2 Location : configurationClasses Killed by : fi.eis.libraries.di.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.JavaConfigTest) replaced return value with null for fi/eis/libraries/di/DependencyInjection::configurationClasses → KILLED 3.3 Location : configurationClasses Killed by : fi.eis.libraries.di.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.JavaConfigTest) mutated return of Object value for fi/eis/libraries/di/DependencyInjection::configurationClasses to ( if (x != null) null else throw new RuntimeException ) → KILLED
|