Mocked objects are shown as null
还没有人认领这个 Issue。
评估
调研方向
首先,在 Ubuntu 20.4 上的 VS Code 1.79.2 中重现 issue 的 Mockito 示例里的模拟对象显示,并将默认 mock 与使用 useConstructor 创建的 mock 进行比较。该 issue 没有指出源文件或测试;完成的标准是确定预期的调试器显示效果,并确认生成的对象显示不再意外地为 null。
由索引模型根据 Issue 内容生成。
描述
Vscode 1.79.2
Ubuntu 20.4
@Service
public class Converters {
private final List<String> something.
public Converters() {
this(new ArrayList<>();
}
public Optional<String> do(String v) {
}
}
@ExtendsWith(MockitoExtention.class)
publi class VsCodeDebuggerTest
{
@Mock
public Converters something;
public void shouldDoSomething() {
when(something.do(any())).thenReturn()
something.do("try");
System.out.println(something);
}
}
//with Mock.mock(something); same result,
//but with Mock.mock(something, withSettings.useConstructor(new Object[0]));
//returns non-null,
//however the mocked object in both case is functional.
I have spent quite a few time to debug the source code of the Mockito, as the null was very confusing, even if it was inside a proxy object.
Not sure, what i can expect, but while Mocking repositories, i have seen non-null objects.
- 主要语言
- TypeScript
- 星标
- 591
- 派生
- 429
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 19
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-java-debug 的其他 Issue
-
ai-triaged enhancement
难度 3/5 1-2 天 新手友好度 55/100
microsoft/vscode-java-debug#1689 · 2 条评论 ·
-
ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 条评论 · 已指派 1 人 ·
-
ai-triaged bug
难度 3/5 1-2 天 新手友好度 48/100
microsoft/vscode-java-debug#1658 · 1 条评论 ·
-
ai-triaged enhancement
难度 4/5 3-5 天 新手友好度 45/100
microsoft/vscode-java-debug#1628 · 3 条评论 ·
-
Feature support. 未关闭ai-triaged enhancement
难度 5/5 一周以上 新手友好度 25/100
microsoft/vscode-java-debug#1616 · 1 条评论 ·
查看 microsoft/vscode-java-debug 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·