自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

原创 java类型转换

byte short char -> int -> long - > float -> double低级向高级自动转换高级向低级要强制转换平级之间也要强制转换

2012-03-04 14:20:17 352

原创 配置cucumber运行环境

1. install ruby2. install devkit3. open cmd and run gem install bundle4. run bundle install5. cd to project dir which contain .feature file, run cucumber .feature file

2012-03-01 20:36:56 691

原创 Testing OSGi components

The term OSGi usually refers to two things - 1. the OSGi alliance2. the OSGi service platformThe first one- the OSGi alliance is an organization of companies started in late March 19

2012-02-27 22:20:54 389

原创 Testing JSF application with JSFUnit

People refer JSF as the implementation of this specification - a server-side, user-interface, component framework for Java technology based applications.some implementations:Apache MyFacesSun'

2012-02-22 22:05:01 421

原创 Cargo

Cargo is a thin wrapper that allows you to manipulate Java EE containers in a standard way.Cargo provides the following Tools and APIs:A Java API to start/stop/configure Java Containers and deploy

2012-02-22 19:57:23 526

转载 序列化

1、序列化是干什么的?       简单说就是为了保存在内存中的各种对象的状态(也就是实例变量,不是方法),并且可以把保存的对象状态再读出来。虽然你可以用你自己的各种各样的方法来保存object states,但是Java给你提供一种应该比你自己好的保存对象状态的机制,那就是序列化。2、什么情况下需要序列化       a)当你想把的内存中的对象状态保存到一个文件中或者数据库中时候

2012-02-21 21:16:53 253

原创 Server-side Java testing with Cactus

Cactus is an open-source framework for in-container testing server-side Java code (mostly J2EE components in the current version of Cactus). It is an extension of JUnit that was created by Vincent M

2012-02-20 12:59:32 362

原创 Ajax Testing

Divided our testing strategies along similar patterns.Use functional tests for the whole application stack as it appears to a user by driving and testing the application with HtmlUnit and Selenium.

2012-02-17 10:23:06 329

原创 XPath

XPath is a language specified by the W3C for querying nodes in an XML document.

2012-02-15 16:07:27 302

原创 Presentation Layer Testing Framework

HtmlUnitSeleniumHtmlUnitThe general pattern with HtmlUnit is to get a page, find the element, click on it, and check the resulting page contents.HtmlPage is HtmlUnit's model of an HTML p

2012-02-14 18:00:40 402

原创 Containers and testing framworks

Container type                                        In-container testing framework to useHTTP containerCactus ( for testing Servlets, JSPs, Tag libraries, Filters and EJBs )HTTP containerJSF

2012-02-14 17:03:16 286

原创 修饰符

包外 子类 包内 类内 public yes yes yes yes protected no yes yes yes default no no yes y

2012-02-14 14:03:07 221

原创 Mock and Stub differences

Stub use State Verificationwhich means that we determine whether the exercised method worked correctly by examining the state of SUT (system under test) and its collaborators after the method was

2012-02-13 20:20:51 278

转载 final用法

final 关键字表示'终态的','无法改变的', 它可以修饰非抽象类,非抽象方法及变量 final类不能被继承,没有子类,final类中的方法默认是final的 final方法不能被子类覆盖,但可以继承 final变量只能一次赋值,不可更改 final不能修饰构造函数 1. final类    final类不能被继承,没有子类,final类中的方法默认是final

2012-02-13 14:57:25 234

转载 方法参数前final的含义

在方法参数前面加final关键字就是为了防止数据在方法体中被修改。这里主要分两种情况:第一,用final修饰基本数据类型;第二,用final修饰引用类型。        第一种情况,修饰基本类型(非引用类型)。这时参数的值在方法体内是不能被修改的,即不能被重新赋值。否则编译就通不过。例如:public void testInt(final int param1) {    pa

2012-02-10 16:18:52 827

原创 EasyMock.isA method

isA(Class clazz)Matches if the actual value is an instance of the given class, or if it is in instance of a class that extends or implements the given class. Null always return false. Available for

2012-02-10 15:57:03 599

原创 andStunReturn vs andReturn

Basically andStubReturn() is used for methods that we do not care about for our test for the mock objects , but we're required to mock the return otherwise, the code will not function. The andStubRe

2012-02-10 15:55:00 640

原创 createMock and createNiceMock and createStrickMock differences

EasyMock.createMock(): Creates a mock object that implements the given interface, orderchecking is disabled by default. EasyMock.createNiceMock() : Creates a mock object that implements th

2012-02-10 14:29:29 827

原创 Ant Task Note

Run the tests in a separate VM. Overrides value set in .-->Directory to write the reports to.  default is the current directory.-->                Only use formatter if the named property

2012-02-09 12:07:06 567

原创 JUnit in Action Note Taking (2nd)

Two definition about unit test:Narrow: a test that examines a single unit in isolation from other units.Broaden: Testing of individual hardware or software units or groups of related units.A

2011-12-30 10:59:29 788

原创 JAXB

将XML转换为Java的过程称为 Unmarshal将Java转换为XML的过程称为Marshal

2011-12-20 11:11:09 394

原创 Junit in Action - Note taking

Unit Test - A unit test examines the behavior of a distinct unit of work. Within a Java application, the "distinct unit of work" is often (but not always) a single method. By contract, integration t

2011-12-11 13:28:38 417

原创 日语转unicode码

String s = "エグゼクティブ ホテル パシフィック";String[] ss = new String[s.length()];for (int i = 0; i ss[i] = Integer.toHexString((int) s.charAt(i) & 0xff);// System.out.println(ss[i]);if (ss[i].contains("

2011-12-05 22:38:17 3715

原创 Oxffff转换成十进制

十六进制0xFFFF可以代表 无 符号数字为 65535;十六进制0xFFFF可以代表 有 符号数字为 -1。有符号数,是按照补码的形式存放的。0xFFFF写成二进制,共有16个1。最高位代表符号,1,代表“-”号;后面的15位,需要“求反加一”才是绝对值,这15个1,即可求出绝对值是1。所以,把十六进制0xFFFF转换成十进制就等于-1。

2011-11-23 22:51:00 12290 1

原创 Test

今天开始记录技术博客

2011-11-18 12:49:05 311

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除