liweiliwei2008 发表于 2009-4-30 13:34:58

求助关于一些Junit使用

大家好。
一些类中有数值或者返回参数,这样我会用junit编写测试类。
但网上有个DrawPad这样一个画图的程序。那里的类没有返回值,只有对象调用。这样该如何写测试类???谁能教教我么??
例如:
class Line extends drawings //直线类

{

void draw(Graphics2D g2d)

{
    g2d.setPaint(new Color(R,G,B));

    g2d.setStroke(new BasicStroke(stroke, BasicStroke.CAP_ROUND,BasicStroke.JOIN_BEVEL));

    g2d.drawLine(x1,y1,x2,y2);

}

}

可以发到我邮箱么??yukifuji520@163.com.
附件中是源程序

[ 本帖最后由 liweiliwei2008 于 2009-4-30 13:40 编辑 ]

rere 发表于 2009-11-12 17:51:34

臭氧发生器

<a href="http://www.jyjxc.cn/product_view-sjycyeyashengjiangpingtaiche.htm">液压升降台</a>
<a href="http://www.jndingye.com">升降平台</a>
<a href="http://www.zbkewen.com">Stainless steel casting</a>
<a href="http://www.shengjiangji0531.cn">升降平台</a>
<a href="http://www.sdsfjd.com.cn">亲子鉴定</a>
<a href="http://www.lusteel.com">welded steel tube</a>
<a href="http://www.hntssb.com">混凝土输送泵</a>
<a href="http://www.lusteel.com">I-beam</a>
<a href="http://www.hntssb.com">混凝土泵</a>
<a href="http://www.yichichina.cn">tower crane</a>
<a href="http://www.shengjiangji0531.cn">液压升降机</a>
<a href="http://www.hi-stone.cn/enindex.asp">kerbstone</a>
<a href="http://www.jnlimeit.cn">拉力试验机</a>
<a href="http://www.topskysteel.com">I-beam</a>
<a href="http://www.lusteel.com">H-beam</a>
<a href="http://www.jndingye.com">升降台</a>
<a href="http://www.topskysteel.com">Stainless steel sheet</a>
<a href="http://www.jnlimeit.cn">弹簧试验机</a>
<a href="http://www.topskysteel.com">angle steel</a>
<a href="http://www.jyjxc.cn">升降机</a>
<a href="http://www.topskysteel.com">Stainless steel tube</a>
<a href="http://www.shengjiangji0531.cn">登车桥</a>
<a href="http://www.topskysteel.com">Round bar</a>
<a href="http://www.jyjxc.cn/chanpinzhanshishengjiangpingtai.htm">升降平台</a>
<a href="http://www.sdyihao.cn">臭氧发生器</a>
<a href="http://www.shengjiangji0531.cn">高空作业车</a>
<a href="http://www.lusteel.com">flat bar</a>
<a href="http://www.jnso.net">臭氧发生器</a>
<a href="http://www.shengjiangji0531.cn">升降机</a>
<a href="http://www.jndingye.com">登车桥</a>
<a href="http://www.jnlimeit.cn">万能试验机</a>
<a href="http://www.topskysteel.com">channel steel</a>
<a href="http://www.83828658.com">罗茨风机</a>
<a href="http://www.lusteel.com">seamless steel tube</a>
<a href="http://www.topskysteel.com">H-beam</a>
<a href="http://www.83828658.com">罗茨鼓风机</a>
<a href="http://www.topskysteel.com">carbon steel seamless pipe</a>
<a href="http://www.tjzlbxg.cn">**板</a>
<a href="http://www.lusteel.com">steel coil</a>

rere 发表于 2009-11-12 17:51:58

升降平台[/

万能试验机
升降平台
Round bar
升降机
液压升降台
升降台
welded steel tube
混凝土泵
angle steel
罗茨鼓风机
H-beam
弹簧试验机
登车桥
混凝土输送泵
H-beam
臭氧发生器
tower crane
亲子鉴定
Stainless steel casting
升降平台
kerbstone
拉力试验机
升降机
**板
I-beam
罗茨风机
臭氧发生器
flat bar
高空作业车
I-beam
登车桥
Stainless steel tube
升降平台
carbon steel seamless pipe
seamless steel tube
steel coil
液压升降机
Stainless steel sheet
channel steel
页: [1]
查看完整版本: 求助关于一些Junit使用