摘要:
背景 单元测试中很多对象需要mock,每次都要写很多重复代码 解决 Mockito提供了@Mock注解,但需要其他操作配合注解 方案1 MockitoAnnotations @Before public void setUp() { MockitoAnnotations.initMocks(this 阅读全文
摘要:
描述 BDD given some preconditions (Arrange) when an action occurs (Act) then verify the output (Assert) 行为驱动开发 given(Arrange): 布置环境 when(Act): 表演 then(A 阅读全文