- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/ArcBees/Jukito
- 软件文档: https://github.com/ArcBees/Jukito/wiki
软件介绍
JUnit、 Guice、 Mockito 高效组合测试框架。
如果你使用 Google Guice,或者如果你的GWT应用程序使用 Gin,那么,Jukito 是解决你的单元测试头痛的灵丹妙药。现在,你可进行如下测试:
@RunWith(JukitoRunner.class)
public class EmailSystemTest {
@Inject EmailSystemImpl emailSystem;
Email dummyEmail;
@Before
public void setupMocks(
IncomingEmails incomingEmails,
EmailFactory factory) {
dummyEmail = factory.createDummy();
when(incomingEmails.count()).thenReturn(1);
when(incomingEmails.get(0)).thenReturn(dummyEmail);
}
@Test
public void shouldFetchEmailWhenStarting(
EmailView emailView) {
// WHEN
emailSystem.start();
// THEN
verify(emailView).addEmail(dummyEmail);
}
}或者:
@RunWith(JukitoRunner.class)
public class CalculatorTest {
public static class Module extends JukitoModule {
protected void configureTest() {
bindMany(Calculator.class,
ScientificCalculator.class,
BusinessCalculator.class);
bindManyInstances(AdditionExample.class,
new AdditionExample(1, 1, 2),
new AdditionExample(10, 10, 20),
new AdditionExample(18, 24, 42));
}
}
@Test
public void testAdd(@All Calculator calculator, @All AdditionExample example) {
// WHEN
int result = calculator.add(example.a, example.b);
// THEN
assertEquals(example.expected, result);
}
}
Open Data Structures
Pat Morin / AU Press / 2013-6 / USD 29.66
Offered as an introduction to the field of data structures and algorithms, Open Data Structures covers the implementation and analysis of data structures for sequences (lists), queues, priority queues......一起来看看 《Open Data Structures》 这本书的介绍吧!
