Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Some ideas to help partition unit tests for clarity

Notifications You must be signed in to change notification settings

cjstremick/UnitTestPartitioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnitTestPartitioning

Some ideas to help partition unit tests for clarity

  • Create a folder for the subject under test (using Test suffix).
  • Create partial classes for each method under test. The class name should match the folder name. The file name should indicate the method name.
  • The tests should still follow the Triple-A (Arrange-Act-Assert) pattern.
  • Each test make assert exactly one assertion.
  • In general, tests should follow Method_Assertion_State convention for their names. When there is no state for the test, this rule can be broken.
  • When asserting exceptions, use Assert.Throws. Never try-catch in unit tests.

About

Some ideas to help partition unit tests for clarity

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages