diff --git a/demo/android-demo/app/build.gradle b/demo/android-demo/app/build.gradle
index 16432b7..835c188 100644
--- a/demo/android-demo/app/build.gradle
+++ b/demo/android-demo/app/build.gradle
@@ -49,7 +49,7 @@ dependencies {
testImplementation 'androidx.test:runner:1.4.0-alpha05'
testImplementation 'junit:junit:4.+'
testImplementation 'org.robolectric:robolectric:4.5.1'
- testImplementation 'com.alibaba.testable:testable-all:0.7.8'
+ testImplementation 'com.alibaba.testable:testable-all:0.7.9'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
\ No newline at end of file
diff --git a/demo/java-demo/build.gradle b/demo/java-demo/build.gradle
index bed7618..2d6d3c1 100644
--- a/demo/java-demo/build.gradle
+++ b/demo/java-demo/build.gradle
@@ -13,8 +13,8 @@ repositories {
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter:5.6.2')
- testImplementation('com.alibaba.testable:testable-all:0.7.8')
- testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.8')
+ testImplementation('com.alibaba.testable:testable-all:0.7.9')
+ testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.9')
}
tasks.withType(JavaCompile) {
diff --git a/demo/java-demo/pom.xml b/demo/java-demo/pom.xml
index cf923ad..85e7ded 100644
--- a/demo/java-demo/pom.xml
+++ b/demo/java-demo/pom.xml
@@ -12,7 +12,7 @@
1.8
1.8
5.9.1
- 0.7.8
+ 0.7.9
diff --git a/demo/kotlin-demo/build.gradle.kts b/demo/kotlin-demo/build.gradle.kts
index 5393678..9c5713c 100644
--- a/demo/kotlin-demo/build.gradle.kts
+++ b/demo/kotlin-demo/build.gradle.kts
@@ -17,8 +17,8 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
- testImplementation("com.alibaba.testable:testable-all:0.7.8")
- testAnnotationProcessor("com.alibaba.testable:testable-processor:0.7.8")
+ testImplementation("com.alibaba.testable:testable-all:0.7.9")
+ testAnnotationProcessor("com.alibaba.testable:testable-processor:0.7.9")
}
tasks.withType {
diff --git a/demo/kotlin-demo/pom.xml b/demo/kotlin-demo/pom.xml
index 422b760..97959ce 100644
--- a/demo/kotlin-demo/pom.xml
+++ b/demo/kotlin-demo/pom.xml
@@ -14,7 +14,7 @@
1.8
1.8
5.9.1
- 0.7.8
+ 0.7.9
diff --git a/demo/spock-demo/build.gradle b/demo/spock-demo/build.gradle
index 14adafd..95789ef 100644
--- a/demo/spock-demo/build.gradle
+++ b/demo/spock-demo/build.gradle
@@ -14,8 +14,8 @@ repositories {
dependencies {
testImplementation 'org.codehaus.groovy:groovy-all:3.0.7'
testImplementation 'org.spockframework:spock-core:2.0-M5-groovy-3.0'
- testImplementation('com.alibaba.testable:testable-all:0.7.8')
- testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.8')
+ testImplementation('com.alibaba.testable:testable-all:0.7.9')
+ testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.9')
}
tasks.withType(JavaCompile) {
diff --git a/demo/spock-demo/pom.xml b/demo/spock-demo/pom.xml
index 48b75b0..a13ae5e 100644
--- a/demo/spock-demo/pom.xml
+++ b/demo/spock-demo/pom.xml
@@ -12,7 +12,7 @@
1.8
1.8
1.8
- 0.7.8
+ 0.7.9
diff --git a/docs/en-us/doc/omni-constructor.md b/docs/en-us/doc/omni-constructor.md
index 975a155..5b04afb 100644
--- a/docs/en-us/doc/omni-constructor.md
+++ b/docs/en-us/doc/omni-constructor.md
@@ -35,7 +35,9 @@ Parent parent = OmniConstructor.newInstance(Parent.class);
parent.getChild().getGrandChild().getContent();
```
-> **Note**: Based on the light-weight principle, in the default mode, `OmniConstructor` will only uses the original constructor of the class to create objects. For POJO and most model layer objects, this mode has been able to meet the needs.
+> Interface and abstract class can also be instantiated by `OmniConstructor`, you can try it e.g. `OmniConstructor.newInstance(CharSequence.class)` ^_^
+
+> **Notice**: Based on the light-weight principle, in the default mode, `OmniConstructor` will only uses the original constructor of the class to create objects. For POJO and most model layer objects, this mode has been able to meet the needs.
> But for more complex situations, such as when certain class have constructors throwing exceptions or contain other statements that hinder the normal execution of the construction, the object construction may fail.
> In those situations, you can use the [Testable global configuration](en-us/doc/javaagent-args.md) `omni.constructor.enhance.enable = true` to enable bytecode enhancement mode of `OmniConstructor`, in this mode, any Java class can be constructed.
diff --git a/docs/en-us/doc/release-note.md b/docs/en-us/doc/release-note.md
index d906ae3..06dca86 100644
--- a/docs/en-us/doc/release-note.md
+++ b/docs/en-us/doc/release-note.md
@@ -1,5 +1,11 @@
# Release Note
+## 0.7.9
+- fix many issues relate to interface instance creation of `OmniConstructor`
+- add `@MockContainer` annotation to support multiply parents inheritance between mock classes
+- add `targetClassName` parameter to `@MockInvoke` annotation, support mock method of private internal class
+- move collection creation methods from `CollectionUtil` class to `CollectionTool` class
+
## 0.7.8
- support use `OmniConstructor` class to create instance of interface type or abstract class
- provide a `CollectionUtil` class which contains many utility collection creation methods
diff --git a/docs/en-us/doc/setup.md b/docs/en-us/doc/setup.md
index 8119c7e..895f17c 100644
--- a/docs/en-us/doc/setup.md
+++ b/docs/en-us/doc/setup.md
@@ -16,7 +16,7 @@ It is recommended to add a `property` field that identifies the TestableMock ver
```xml
- 0.7.8
+ 0.7.9
```
@@ -63,8 +63,8 @@ Add dependence of `TestableMock` in `build.gradle` file:
```groovy
dependencies {
- testImplementation('com.alibaba.testable:testable-all:0.7.8')
- testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.8')
+ testImplementation('com.alibaba.testable:testable-all:0.7.9')
+ testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.9')
}
```
diff --git a/docs/zh-cn/doc/omni-constructor.md b/docs/zh-cn/doc/omni-constructor.md
index caa9aed..de71044 100644
--- a/docs/zh-cn/doc/omni-constructor.md
+++ b/docs/zh-cn/doc/omni-constructor.md
@@ -35,6 +35,8 @@ Parent parent = OmniConstructor.newInstance(Parent.class);
parent.getChild().getGrandChild().getContent();
```
+> 接口类型和抽象类型也可以直接通过`OmniConstructor`实例化哦,不信试试看`OmniConstructor.newInstance(CharSequence.class)` ^_^
+
> **注意**:基于轻量优先原则,默认模式下,`OmniConstructor`仅利用类型原有的构造方法来创建对象,对于绝大多数POJO和`Model`层对象而言这种模式已经能够满足需要。
> 但对于更复杂的情形,譬如遇到某些类型的构造方法会抛出异常或包含其他妨碍构造正常执行的语句时,对象构造可能会失败。
> 此时可通过[Testable全局配置](zh-cn/doc/javaagent-args.md)`omni.constructor.enhance.enable = true`启用`OmniConstructor`的字节码增强模式,在该模式下,任何Java类型皆可构造。
diff --git a/docs/zh-cn/doc/release-note.md b/docs/zh-cn/doc/release-note.md
index fa5aa70..6f682e9 100644
--- a/docs/zh-cn/doc/release-note.md
+++ b/docs/zh-cn/doc/release-note.md
@@ -1,5 +1,11 @@
# Release Note
+## 0.7.9
+- 修复多处`OmniConstructor`创建接口类型对象相关的问题
+- 新增`@MockContainer`注解,支持Mock容器类之间的多重继承
+- `@MockInvoke`注解新增`targetClassName`参数,支持Mock私有内部类的方法
+- 将`CollectionUtil`中的集合构造方法独立为`CollectionTool`工具类并发布
+
## 0.7.8
- 支持使用`OmniConstructor`工具类自动创建接口和抽象类的实例
- 提供`CollectionUtil`工具类,包含在测试中常用的集合创建方法
diff --git a/docs/zh-cn/doc/setup.md b/docs/zh-cn/doc/setup.md
index 1cbbb9b..e2ab7c8 100644
--- a/docs/zh-cn/doc/setup.md
+++ b/docs/zh-cn/doc/setup.md
@@ -16,7 +16,7 @@
```xml
- 0.7.8
+ 0.7.9
```
@@ -63,8 +63,8 @@
```groovy
dependencies {
- testImplementation('com.alibaba.testable:testable-all:0.7.8')
- testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.8')
+ testImplementation('com.alibaba.testable:testable-all:0.7.9')
+ testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.9')
}
```
diff --git a/testable-agent/pom.xml b/testable-agent/pom.xml
index efebcc0..c2ca071 100755
--- a/testable-agent/pom.xml
+++ b/testable-agent/pom.xml
@@ -6,7 +6,7 @@
com.alibaba.testable
testable-parent
- 0.7.8
+ 0.7.9
../testable-parent
testable-agent
diff --git a/testable-all/pom.xml b/testable-all/pom.xml
index 76224dc..5798291 100644
--- a/testable-all/pom.xml
+++ b/testable-all/pom.xml
@@ -6,7 +6,7 @@
com.alibaba.testable
testable-parent
- 0.7.8
+ 0.7.9
../testable-parent
testable-all
diff --git a/testable-core/pom.xml b/testable-core/pom.xml
index 738601d..45967eb 100644
--- a/testable-core/pom.xml
+++ b/testable-core/pom.xml
@@ -6,7 +6,7 @@
com.alibaba.testable
testable-parent
- 0.7.8
+ 0.7.9
../testable-parent
testable-core
diff --git a/testable-maven-plugin/pom.xml b/testable-maven-plugin/pom.xml
index e5cd37f..5ea6f5a 100644
--- a/testable-maven-plugin/pom.xml
+++ b/testable-maven-plugin/pom.xml
@@ -6,7 +6,7 @@
com.alibaba.testable
testable-parent
- 0.7.8
+ 0.7.9
../testable-parent
testable-maven-plugin
diff --git a/testable-parent/pom.xml b/testable-parent/pom.xml
index 2ea0f16..a055549 100644
--- a/testable-parent/pom.xml
+++ b/testable-parent/pom.xml
@@ -5,7 +5,7 @@
4.0.0
com.alibaba.testable
testable-parent
- 0.7.8
+ 0.7.9
pom
testable-parent
Unit test enhancement toolkit
@@ -42,7 +42,7 @@
3.0.1
1.6.13
3.7.0
- 0.7.8
+ 0.7.9
diff --git a/testable-processor/pom.xml b/testable-processor/pom.xml
index e25c606..d36e865 100644
--- a/testable-processor/pom.xml
+++ b/testable-processor/pom.xml
@@ -6,7 +6,7 @@
com.alibaba.testable
testable-parent
- 0.7.8
+ 0.7.9
../testable-parent
testable-processor