Lecture overview -- Keyboard shortcut: 'u'  Previous page: NUnit Assertions -- Keyboard shortcut: 'p'  Next page: Another Unit Test example in C# -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 27 : 35
Object-oriented Programming in C#
Test of Object-oriented Programs
Unit Test Concepts

Understanding the common concepts of Unit testing

  • Assertion

    • A boolean function which compares some value or state with its expected result

    • "An atomic test" - true means pass, false means fail

  • Test or Test case

    • Execution of a piece of code followed by activation of one or more assertions

  • Test suite

    • An aggregation of test cases

  • Test fixture

    • A fixed state used as a baseline for running a set of tests [Wikipedia]

    • Used to ensure that each test is executed in a fixed and well-defined state, such that a test is repeatable

Test cases and Test suites may be organized as a Composite