release v0.7.1

This commit is contained in:
金戟 2021-12-11 22:59:49 +08:00
parent fda7ee23c7
commit db4e02a201
20 changed files with 70 additions and 23 deletions

View File

@ -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.0'
testImplementation 'com.alibaba.testable:testable-all:0.7.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

View File

@ -13,8 +13,8 @@ repositories {
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter:5.6.2')
testImplementation('com.alibaba.testable:testable-all:0.7.0')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.0')
testImplementation('com.alibaba.testable:testable-all:0.7.1')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.1')
}
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.7.0</testable.version>
<testable.version>0.7.1</testable.version>
</properties>
<dependencies>

View File

@ -0,0 +1,9 @@
package com.alibaba.demo.basic.issue;
public abstract class AbstractServiceA {
public String put(Object input) {
return "object";
}
}

View File

@ -0,0 +1,9 @@
package com.alibaba.demo.basic.issue;
public class ServiceA extends AbstractServiceA {
public String get(Object input) {
return super.put(input);
}
}

View File

@ -0,0 +1,23 @@
package com.alibaba.demo.basic.issue;
import com.alibaba.testable.core.annotation.MockInvoke;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class ServiceATest {
private ServiceA sa = new ServiceA();
public static class Mock {
@MockInvoke(targetClass = AbstractServiceA.class, targetMethod = "put")
public String put(Object input) {
return "mocked";
}
}
@Test
void get() {
assertEquals("mocked", sa.get(123));
}
}

View File

@ -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.0")
testAnnotationProcessor("com.alibaba.testable:testable-processor:0.7.0")
testImplementation("com.alibaba.testable:testable-all:0.7.1")
testAnnotationProcessor("com.alibaba.testable:testable-processor:0.7.1")
}
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.7.0</testable.version>
<testable.version>0.7.1</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.7.0')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.0')
testImplementation('com.alibaba.testable:testable-all:0.7.1')
testAnnotationProcessor('com.alibaba.testable:testable-processor:0.7.1')
}
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.7.0</testable.version>
<testable.version>0.7.1</testable.version>
</properties>
<dependencyManagement>

View File

@ -1,5 +1,8 @@
# Release Note
## 0.7.1
- fix an issue cause mock class unrecognized after package-mapping
## 0.7.0
- fix an improper exception issue when mock method with `associated` scope invoked
- rename type `InvokeVerifier`/`InvockeMatcher` to `InvocationVerifier`/`InvocationMatcher`

View File

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

View File

@ -1,5 +1,8 @@
# Release Note
## 0.7.1
- 修复包路径映射时后识别不到Mock类的问题issue-248
## 0.7.0
- 修复当`scope`为`associated`的Mock方法被`null`对象调用且上下文与测试用例未关联时抛错不合理的问题issue-163
- 类型`InvokeVerifier`和`InvockeMatcher`更名为`InvocationVerifier`和`InvocationMatcher`

View File

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

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.testable</groupId>
<artifactId>testable-parent</artifactId>
<version>0.7.0</version>
<version>0.7.1</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.7.0</version>
<version>0.7.1</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.7.0</version>
<version>0.7.1</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.7.0</version>
<version>0.7.1</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.7.0</version>
<version>0.7.1</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.7.0</testable.version>
<testable.version>0.7.1</testable.version>
</properties>
<profiles>

View File

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