Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 584 Bytes

File metadata and controls

25 lines (19 loc) · 584 Bytes

UnitTestExamples

Educational examples of unit test basics

CounterTest

  • Test class structure
  • Phases in unit test (Setup/Exercise/Verify or Arrange/Act/Assert)

CounterTest2

  • Setup and TearDown
  • Guard assert (inconclusive test)

AdvancedCounterTest

  • Operator testing
  • Event raising testing
  • Exceptiong throwing testing

UserTest - not testable

  • Example of not testable design

UserTest - Stub

  • Showing different examples of manual fake object (spy and stub)
  • NSubstitute example

CalculatorTest

  • Reducing complexity and simplifying testing