简体   繁体   English

我应该首先使用 Android 清洁架构 (TDD) 测试什么

[英]What should I test first with Android Clean Architecture (TDD)

I'm learning TDD with my toy project with Android Clean Architecture.我正在使用 Android Clean Architecture 的玩具项目学习 TDD。

I want to know how to process my Unit Test.我想知道如何处理我的单元测试。

I want to do TDD with my search features, in this case, Should I create my UseCase and test it first?我想用我的搜索功能做 TDD,在这种情况下,我应该先创建我的 UseCase 并测试它吗?

Or should create api client and test it first with fake data?还是应该创建 api 客户端并首先使用假数据对其进行测试?

If my question is not understandable, please notice me.如果我的问题无法理解,请注意我。

Thanks for your answer.感谢您的回答。

With a Clean Architecture I would always start with the UseCases first, because this is where your business logic and therefore the value is.对于干净的架构,我总是首先从用例开始,因为这是您的业务逻辑所在,因此价值所在。 Anything related to implementing Adapters can be defered to the latest possible time.任何与实现适配器相关的事情都可以推迟到最晚的时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM