alibaba / alibaba/testable-mock

如何Mock多个值

Open
#295 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

有一个痛点,就是我一个待测类里面有多个条件,每个条件都是对同一个类的Mock,但是Mock的返回值不一样。而testable-mock是在一个静态内部类提前把所有的东西Mock完,这样我就无法获得准确的Mock值。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the testable-mock mechanism that defines mocks in a static inner class, as described in the issue. Determine how multiple conditions currently mock the same class and define completion as allowing those conditions to receive distinct, accurate return values.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.