- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: http://google.github.io/gwtmockito/
- 软件文档: https://github.com/google/gwtmockito
- 官方下载: https://github.com/google/gwtmockito/releases
软件介绍
GwtMockito 是 GWT 应用测试工具。
使用 GWTTestCase 测试 GWT 应用会比纯 Java 测试慢,而且不能使用基于反射的工具,比如模拟测试框架。如果尝试使用常规测试示例,那么会遇到这个错误:
ERROR: GWT.create() is only usable in client code! It cannot be called, for example, from server code. If you are running a unit test, check that your test case extends GWTTestCase and that GWT.create() is not called from within an initializer or constructor.
GwtMockito 就很好的解决了这个问题,允许从 JUnit 测试中调用 GWT.create。返回 Mockito mocks。
使用:
public class MyWidget extends Composite {
interface MyUiBinder extends UiBinder<Widget, MyWidget> {}
private final MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
@UiField Label numberLabel;
private final NumberFormatter formatter;
public MyWidget(NumberFormatter formatter) {
this.formatter = formatter;
initWidget(uiBinder.createAndBindUi(this);
}
void setNumber(int number) {
numberLabel.setText(formatter.format(number));
}
}C语言程序设计现代方法
K. N. King / 人民邮电出版社 / 2007-11 / 55.00元
《C语言程序设计现代方法》最主要的一个目的就是通过一种“现代方法”来介绍C语言,实现客观评价C语言、强调标准化C语言、强调软件工程、不再强调“手工优化”、强调与c++语言的兼容性的目标。《C语言程序设计现代方法》分为C语言的基础特性。C语言的高级特性、C语言标准库和参考资料4个部分。每章都有“问与答”小节,给出一系列与本章内容相关的问题及其答案,此外还包含适量的习题。一起来看看 《C语言程序设计现代方法》 这本书的介绍吧!
HTML 编码/解码
HTML 编码/解码
HSV CMYK 转换工具
HSV CMYK互换工具
