SoftwareTest

所属分类:数据结构
开发工具:Java
文件大小:238KB
下载次数:20
上传日期:2013-05-02 09:24:42
上 传 者aecsun
说明:  本例是软件测试课的用例,用以测试电信通话中话费计算时出现的各种问题,尤其是夏至日和冬至日的时间转换问题,以及一个JUnit的简单测试用例。   对电话账单来说,春季和秋季的标准时间与夏时制时间的转换会带来有意思的问题。春季,这种转换发生在(3月末、4月初的)星期日凌晨2:00时,这时时钟要设置为凌晨3:00时。对称的转换通常发生在10月最后一个星期日,时钟要从2:59:59调回到2:00:00。    请为采用以下费率计算用户的每月通话费:    通话时间<=20分钟时,每分钟收费0.05美元,通话时间不到1分钟时按1分钟计算。    通话时间>20分钟时,收费1.00美元,超过20分钟的部分,每分钟0.10美元,不到1分钟时按1分钟计算。    假设:    通话计费时间从被叫方应答开始计算,到呼叫方挂机时结束。    没有超过20个小时的通话。 网上没有找到代码只好自己写一个了。
(Google s translation is not reliable. This case, the software testing course use cases to test telecommunications call charge calculating various problems, especially in the time of the summer solstice and the winter solstice conversion issues, as well as a simple JUnit test cases. For phone bill, spring and fall between standard time and daylight savings time conversion will bring interesting question. , This conversion occurred in the spring (end of March, early April) 2:00 am Sunday morning, when the clock is set to 3:00 pm. The symmetric transition typically occurs the last Sunday in October, the clock from the 2:59:59 transferred back to 2:00:00. Monthly call charges calculated using the following rates: Talk time <= 20 minutes, costs $ 0.05 per minute, talk time less than 1 minute 1 minute. Talk time> 20 minutes and costs $ 1.00, more than a 20-minute parts, $ 0.10 per minute, less than 1 minute 1 minute. Assumptions: Call billing time from the called party answers,)

文件列表:
软件测试\软件测试一二实验报告.doc (657037, 2013-05-02)
软件测试 (0, 2013-05-02)
软件测试\软件测试一 (0, 2013-05-02)
软件测试\软件测试一\代码 (0, 2013-05-02)
软件测试\软件测试一\代码\InputStringTest.java (3618, 2013-05-02)
软件测试\软件测试一\代码\My_Date.java (984, 2013-05-02)
软件测试\软件测试一\代码\TelFeeCal.java (10336, 2013-05-02)
软件测试\软件测试一\代码\test.java (1125, 2013-05-02)
软件测试\软件测试二 (0, 2013-05-02)
软件测试\软件测试二\Insurance.java (799, 2013-05-02)
软件测试\软件测试二\InsuranceTest.java (806, 2013-05-02)

使用注意: 本实例在测试时需要手动设置时间,并且只能查询某月单次通话产生的费用,并没有设置月份账单查询功能。 关于时间转换的部分采用信号控制方法,如果在通话中发生了时间转换且通过判断通话所在日期为符合条件的周日,则计算中采用时间转换的解决方法。 不足之处: 程序中仍有不足之处,当没有对当通话是时差发生而此时时差跳转信号却没有发出这一特例做出判断。另外时间比较仓促,代码结构过于臃肿嗦。 2013.5.1 by Wayne

近期下载者

相关文件


收藏者