alibaba / alibaba/testable-mock

Mock容器里面的mock方法还得明确指定targetClass是不是有点不符合语义

Open
#200 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.8k
Forks
306
PR merge metrics
No merged PRs in 30d

Description

https://github.com/alibaba/testable-mock/blob/6616ff1174447a50fdf7db3cd9b8d269f7ca6be0/demo/java-demo/src/test/java/com/alibaba/demo/association/CookerServiceMock.java#L6-L26

是否考虑提供这样一种约定,`targetClass` 为空时就代表Mock容器所关联的被测类中的方法

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with demo/java-demo/src/test/java/com/alibaba/demo/association/CookerServiceMock.java, especially the referenced mock methods, and trace how the mock container associates with its tested class. Check how an empty targetClass is currently handled. Done means methods without an explicit targetClass resolve against the associated tested class while existing explicit targetClass behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.