release v0.4.4

This commit is contained in:
金戟 2020-12-24 07:33:45 +08:00
parent 6b126223e8
commit d6ac715f57
15 changed files with 29 additions and 21 deletions

View File

@ -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 {

View File

@ -12,7 +12,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<junit.version>5.6.2</junit.version>
<testable.version>0.4.3</testable.version>
<testable.version>0.4.4</testable.version>
</properties>
<dependencies>

View File

@ -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<KotlinCompile> {

View File

@ -14,7 +14,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<junit.version>5.6.2</junit.version>
<testable.version>0.4.3</testable.version>
<testable.version>0.4.4</testable.version>
</properties>
<dependencies>

View File

@ -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

View File

@ -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

View File

@ -15,7 +15,7 @@ It is recommended to add a `property` field that identifies the TestableMock ver
```xml
<properties>
<testable.version>0.4.3</testable.version>
<testable.version>0.4.4</testable.version>
</properties>
```
@ -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')
}
```

View File

@ -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

View File

@ -15,7 +15,7 @@
```xml
<properties>
<testable.version>0.4.3</testable.version>
<testable.version>0.4.4</testable.version>
</properties>
```
@ -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')
}
```

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.4.3</version>
<version>0.4.4</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-agent</artifactId>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.4.3</version>
<version>0.4.4</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-all</artifactId>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.4.3</version>
<version>0.4.4</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-core</artifactId>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.4.3</version>
<version>0.4.4</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-maven-plugin</artifactId>

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.4.3</version>
<version>0.4.4</version>
<packaging>pom</packaging>
<name>testable-parent</name>
<description>Unit test enhancement toolkit</description>
@ -42,7 +42,7 @@
<plugin.gpg.version>1.6</plugin.gpg.version>
<plugin.staging.version>1.6.8</plugin.staging.version>
<plugin.maven.version>3.6.0</plugin.maven.version>
<testable.version>0.4.3</testable.version>
<testable.version>0.4.4</testable.version>
</properties>
<profiles>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.4.3</version>
<version>0.4.4</version>
<relativePath>../testable-parent</relativePath>
</parent>
<artifactId>testable-processor</artifactId>