release v0.6.5

This commit is contained in:
金戟 2021-05-02 08:10:58 +08:00
parent 350802fc9b
commit 96d1f9d633
18 changed files with 37 additions and 24 deletions

View File

@ -13,8 +13,8 @@ repositories {
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter:5.6.2')
testImplementation('com.alibaba.testable:testable-all:0.6.4')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.4')
testImplementation('com.alibaba.testable:testable-all:0.6.5')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.5')
}
tasks.withType(JavaCompile) {

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.6.4</testable.version>
<testable.version>0.6.5</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.6.4")
testAnnotationProcessor("com.alibaba.testable:testable-processor:0.6.4")
testImplementation("com.alibaba.testable:testable-all:0.6.5")
testAnnotationProcessor("com.alibaba.testable:testable-processor:0.6.5")
}
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.6.4</testable.version>
<testable.version>0.6.5</testable.version>
</properties>
<dependencies>

View File

@ -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.6.4')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.4')
testImplementation('com.alibaba.testable:testable-all:0.6.5')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.5')
}
tasks.withType(JavaCompile) {

View File

@ -12,7 +12,7 @@
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<testable.version>0.6.4</testable.version>
<testable.version>0.6.5</testable.version>
</properties>
<dependencyManagement>

View File

@ -1,5 +1,11 @@
# Release Note
## 0.6.5
- fix an issue cause `OmniConstructor` fail to handle classes like Date and BigDecimal
- fix an issue of `PrivateAccessor` fail to invoke method with single array parameter
- fix an issue of mock methods in super class are ignored when `scope` is `associated`
- fix an issue of empty mock method not works when `scope` is `associated`
## 0.6.4
- `TestableNull` class removed, let `OmniConstructor` even lighter
- support `@Nested` annotation of JUnit 5

View File

@ -16,7 +16,7 @@ It is recommended to add a `property` field that identifies the TestableMock ver
```xml
<properties>
<testable.version>0.6.4</testable.version>
<testable.version>0.6.5</testable.version>
</properties>
```
@ -63,8 +63,8 @@ Add dependence of `TestableMock` in `build.gradle` file:
```groovy
dependencies {
testImplementation('com.alibaba.testable:testable-all:0.6.4')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.4')
testImplementation('com.alibaba.testable:testable-all:0.6.5')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.5')
}
```

View File

@ -1,7 +1,7 @@
复用Mock类与方法
---
Don't Repeat Yourself是软件开发过程当中的一项重要原则即“DRY原则”在编写测试代码时有些通用的基础功能调用语句常常出现在许多相似的业务类里若测试中需要Mock这些调用就要在各个测试类中重复提供同样的Mock方法。而通过Mock方法的复用机制能够很好的避免编写臃肿重复Mock代码的麻烦。
Don't Repeat Yourself是软件开发过程当中的一项重要原则即“DRY原则”在编写测试代码时有些通用的基础功能调用语句常常出现在许多相似的业务类里若测试中需要Mock这些调用就要在各个测试类中重复提供同样的Mock方法。而通过Mock方法的复用机制能够很好的避免编写臃肿重复Mock代码的麻烦。
TestableMock支持两种粒度的Mock复用方式<u>复用Mock类</u><u>复用Mock方法</u>
@ -11,7 +11,6 @@ TestableMock支持两种粒度的Mock复用方式<u>复用Mock类</u>和<u>
进行类级别的Mock复用只需将Mock容器定义为独立的类然后在要使用它的测试类上通过`@MockWith`进行引用。例如:
```java
@MockWith(ServiceMock.class)
public class AaaServiceTest {

View File

@ -42,6 +42,8 @@
### 2.1 直接访问私有成员
> 由于IDE语法报错原因此特性计划在未来版本中移除建议采用`PrivateAccessor`方式
第二种方法,除了借助`PrivateAccessor`工具类以外,凡是使用了`@EnablePrivateAccess`注解的测试类还会被自动赋予以下“特殊能力”:
- 调用**被测类**的私有方法(包括静态方法)

View File

@ -1,5 +1,11 @@
# Release Note
## 0.6.5
- 修复`OmniConstructor`对某些系统类型的兼容问题issue-145
- 修复`PrivateAccessor`无法调用仅有数组类型参数方法的问题issue-152
- 修复当`scope`为`associated`时父类中的Mock方法不生效问题issue-139
- 修复当`scope`为`associated`时空白的Mock方法会报错的问题issue-154
## 0.6.4
- 移除`TestableNull`类型,让`OmniConstructor`更轻量
- 支持JUnit 5的`@Nested`注解issue-140

View File

@ -16,7 +16,7 @@
```xml
<properties>
<testable.version>0.6.4</testable.version>
<testable.version>0.6.5</testable.version>
</properties>
```
@ -63,8 +63,8 @@
```groovy
dependencies {
testImplementation('com.alibaba.testable:testable-all:0.6.4')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.4')
testImplementation('com.alibaba.testable:testable-all:0.6.5')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.6.5')
}
```

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.6.4</version>
<version>0.6.5</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.6.4</version>
<version>0.6.5</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.6.4</version>
<version>0.6.5</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.6.4</version>
<version>0.6.5</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.6.4</version>
<version>0.6.5</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.6.4</testable.version>
<testable.version>0.6.5</testable.version>
</properties>
<profiles>

View File

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