CSCI 3130 - Software Engineering - TDD


  • 作业标题:CSCI 3130 - Software Engineering TDD
  • 课程名称:Dalhouse University CSCI 3130 Software Engineering
  • 完成周期:3天

Expectations

For this assignment, choose a person taking this course as your assignment partner. In phase 1 of the assignment, you will write tests individually for one of the given problems. Both members must select one of the given problems and make sure that both members work on different problems.

Phase 1

Problem 1: Write test cases for a Stack class.

  • Test to check whether the number of elements in a newly created Stack object is zero.
  • Test to check whether the number of elements in a Stack object is one after ‘push’ method is called once.
  • Test to check whether you get item “b” (assuming the Stack holds strings) from a Stack object after calling ‘push(“a”)’,’push(“b”)’, and ‘pop()’ in that order.
  • Test whether the ‘pop’ method throws an UnderFlowException if the method is called on an empty Stack object.

Problem 2: Write test cases for a Queue class.

  • Test whether the number of elements in a newly created Queue object is zero.
  • Test whether the number of elements in a Queue object is one after the ‘enqueue’ method is called once.
  • Test to check whether you get item “a” (assuming the queue holds strings) from a queue object after calling ‘enqueue(“a”)’, ‘enqueue(“b”)’, and ‘dequeue()’ in that order.
  • Test whether the ‘dequeue’ method throws an UnderFlowException if the method is called on an empty Queue object.

Phase 2

。。。


文章作者: IT神助攻
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 IT神助攻 !
  目录