diff --git a/demo/java-demo/build.gradle b/demo/java-demo/build.gradle index bce4c00..d42f8b3 100644 --- a/demo/java-demo/build.gradle +++ b/demo/java-demo/build.gradle @@ -12,8 +12,8 @@ repositories { dependencies { testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') - testImplementation('com.alibaba.testable:testable-all:0.4.3') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.4.3') + testImplementation('com.alibaba.testable:testable-all:0.4.4') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.4.4') } test { diff --git a/demo/java-demo/pom.xml b/demo/java-demo/pom.xml index 4f83e66..6b27b75 100644 --- a/demo/java-demo/pom.xml +++ b/demo/java-demo/pom.xml @@ -12,7 +12,7 @@ 1.8 1.8 5.6.2 - 0.4.3 + 0.4.4 diff --git a/demo/kotlin-demo/build.gradle.kts b/demo/kotlin-demo/build.gradle.kts index 51e59b9..4b509c7 100644 --- a/demo/kotlin-demo/build.gradle.kts +++ b/demo/kotlin-demo/build.gradle.kts @@ -16,8 +16,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.4.3") - testAnnotationProcessor("com.alibaba.testable:testable-processor:0.4.3") + testImplementation("com.alibaba.testable:testable-all:0.4.4") + testAnnotationProcessor("com.alibaba.testable:testable-processor:0.4.4") } tasks.withType { diff --git a/demo/kotlin-demo/pom.xml b/demo/kotlin-demo/pom.xml index e67107b..ce0e18a 100644 --- a/demo/kotlin-demo/pom.xml +++ b/demo/kotlin-demo/pom.xml @@ -14,7 +14,7 @@ 1.8 1.8 5.6.2 - 0.4.3 + 0.4.4 diff --git a/docs/en-us/doc/private-accessor.md b/docs/en-us/doc/private-accessor.md index 1821ddc..9cc2914 100644 --- a/docs/en-us/doc/private-accessor.md +++ b/docs/en-us/doc/private-accessor.md @@ -3,7 +3,7 @@ Private Accessor Nowadays, the debate about whether private methods should be unit tested is gradually disappearing, and the common practice of developers has given factual answers. Indirect testing of private methods through public methods is difficult in many cases. Developers are more willing to modify method visibility to make original private methods testable in test cases. -In addition, before unit testing begin, it is often necessary to initialize specific member fields of the object under test, but sometimes it could be impossible to easily assign values to these private fields. So, is it possible let the code in the unit test case directly access the private methods and member fields of the class under test without breaking the encapsulation of the tested type? `TestableMock` provides two simple solutions. +In addition, before unit testing begin, it is often necessary to initialize specific member fields of the object under test, but sometimes it could be impossible to easily assign values to these private fields. So, is it possible let the code in the unit test case directly access the private methods and member fields of the class under test without breaking the encapsulation of the type under test? `TestableMock` provides two simple solutions. ### Solution 1: Use `@EnablePrivateAccess` annotation diff --git a/docs/en-us/doc/release-note.md b/docs/en-us/doc/release-note.md index 1db2f94..089cdc9 100644 --- a/docs/en-us/doc/release-note.md +++ b/docs/en-us/doc/release-note.md @@ -1,5 +1,9 @@ # Release Note +## 0.4.4 +- fix an issue of accessing private method with interface type parameter fail +- fix an issue of mocking static method without parameter fail + ## 0.4.3 - support static private member access diff --git a/docs/en-us/doc/setup.md b/docs/en-us/doc/setup.md index b372c46..72daea4 100644 --- a/docs/en-us/doc/setup.md +++ b/docs/en-us/doc/setup.md @@ -15,7 +15,7 @@ It is recommended to add a `property` field that identifies the TestableMock ver ```xml - 0.4.3 + 0.4.4 ``` @@ -62,8 +62,8 @@ Add dependence of `TestableMock` in `build.gradle` file: ```groovy dependencies { - testImplementation('com.alibaba.testable:testable-all:0.4.3') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.4.3') + testImplementation('com.alibaba.testable:testable-all:0.4.4') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.4.4') } ``` diff --git a/docs/zh-cn/doc/release-note.md b/docs/zh-cn/doc/release-note.md index 1db2f94..a0db803 100644 --- a/docs/zh-cn/doc/release-note.md +++ b/docs/zh-cn/doc/release-note.md @@ -1,7 +1,11 @@ # Release Note +## 0.4.4 +- 修复无法访问参数类型包含接口的私有方法的BUG (issue-15) +- 修复Mock无参数的静态方法会出错的BUG (issue-16) + ## 0.4.3 -- support static private member access +- 完善了对私有静态成员的直接访问能力 ## 0.4.2 - support change javaagent global log level via maven plugin diff --git a/docs/zh-cn/doc/setup.md b/docs/zh-cn/doc/setup.md index 86f8d06..bc4bd56 100644 --- a/docs/zh-cn/doc/setup.md +++ b/docs/zh-cn/doc/setup.md @@ -15,7 +15,7 @@ ```xml - 0.4.3 + 0.4.4 ``` @@ -62,8 +62,8 @@ ```groovy dependencies { - testImplementation('com.alibaba.testable:testable-all:0.4.3') - testAnnotationProcessor('com.alibaba.testable:testable-processor:0.4.3') + testImplementation('com.alibaba.testable:testable-all:0.4.4') + testAnnotationProcessor('com.alibaba.testable:testable-processor:0.4.4') } ``` diff --git a/testable-agent/pom.xml b/testable-agent/pom.xml index 54670ec..c18a978 100755 --- a/testable-agent/pom.xml +++ b/testable-agent/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.4.3 + 0.4.4 ../testable-parent testable-agent diff --git a/testable-all/pom.xml b/testable-all/pom.xml index 3211145..eb2a431 100644 --- a/testable-all/pom.xml +++ b/testable-all/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.4.3 + 0.4.4 ../testable-parent testable-all diff --git a/testable-core/pom.xml b/testable-core/pom.xml index f5334e4..c0469b6 100644 --- a/testable-core/pom.xml +++ b/testable-core/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.4.3 + 0.4.4 ../testable-parent testable-core diff --git a/testable-maven-plugin/pom.xml b/testable-maven-plugin/pom.xml index ba4758a..166c690 100644 --- a/testable-maven-plugin/pom.xml +++ b/testable-maven-plugin/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.4.3 + 0.4.4 ../testable-parent testable-maven-plugin diff --git a/testable-parent/pom.xml b/testable-parent/pom.xml index 27f015d..c4df5db 100644 --- a/testable-parent/pom.xml +++ b/testable-parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.alibaba.testable testable-parent - 0.4.3 + 0.4.4 pom testable-parent Unit test enhancement toolkit @@ -42,7 +42,7 @@ 1.6 1.6.8 3.6.0 - 0.4.3 + 0.4.4 diff --git a/testable-processor/pom.xml b/testable-processor/pom.xml index ef34bc7..58ade9f 100644 --- a/testable-processor/pom.xml +++ b/testable-processor/pom.xml @@ -6,7 +6,7 @@ com.alibaba.testable testable-parent - 0.4.3 + 0.4.4 ../testable-parent testable-processor