LoginSignup
2
2

More than 5 years have passed since last update.

非公開関数のユニットテストについて (C#)

Last updated at Posted at 2018-06-13

非公開関数のユニットテストについて (C#)

備忘録として.

非公開関数のユニットテストをしたいときには以下のようにする.

  1. 対象のアクセス修飾子をinternalにする.
  2. 対象のプロジェクトのProperties\AssemblyInfo.csを開き、[assembly: InternalsVisibleTo("ユニットテストのアセンブリ名")]を追記する.
2
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2