Redian新闻
>
PhD Position Available at University of Wisconsin-Milwaukee
avatar
PhD Position Available at University of Wisconsin-Milwaukee# Engineering - 工程
c*n
1
the nasty thing about jmock is that whenever I want to mock a dependent
object, I have to abstract out the object creation,
and turn a statment like
MyClass obj = new MyClass();
into
MyClass obj = createMyClass();
while production code has
MyClass createMyClass() { return new MyClass();}
and mock code has
MyClass createMyClass() { return instance_var_mock_myclass;}
I end up having a lot of createXXX() methods in each class implemented,
furthermore, clover would complain that the createXXX() them
avatar
f*s
2
A PhD student research assistant position is available at Mechanical
Engineering Department, University of Wisconsin-Milwaukee (UWM). The
assistantship includes full tuition waiver plus a stipend.
Starting time: Fall 2009 (preferred) or Spring 2010
Background Requirement: Candidates with solid background in thermal/fluids,
chemical, material, or environmental engineering are encouraged to apply.
Candidate with master degree or is about to complete his/her master degree
by Fall 2009 is preferred.
avatar
S*a
3
lots of mockup tools.
we also use mokito and easymock as well.

【在 c******n 的大作中提到】
: the nasty thing about jmock is that whenever I want to mock a dependent
: object, I have to abstract out the object creation,
: and turn a statment like
: MyClass obj = new MyClass();
: into
: MyClass obj = createMyClass();
: while production code has
: MyClass createMyClass() { return new MyClass();}
: and mock code has
: MyClass createMyClass() { return instance_var_mock_myclass;}

avatar
m*t
4
JMock is best used to mock interfaces, i.e., where you would inject
implementations
instead of hardcoded new SomeClass(). In the latter case the two classes
are probably
too tightly coupled to be tested separately anyway.

【在 c******n 的大作中提到】
: the nasty thing about jmock is that whenever I want to mock a dependent
: object, I have to abstract out the object creation,
: and turn a statment like
: MyClass obj = new MyClass();
: into
: MyClass obj = createMyClass();
: while production code has
: MyClass createMyClass() { return new MyClass();}
: and mock code has
: MyClass createMyClass() { return instance_var_mock_myclass;}

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。