以前こちらの記事で作成したBetween()メソッドですが、 NUnitで自作クラスのユニットテストを行う #c# #NUnit - Qiita ジェネリックと拡張メソッドを使えば、より汎用的で使いやすくなります。 書きなおしたメソッド public static class MyGeneral // 静的クラス { // 静的クラスなのでコンストラクタは無し /// <summary> /// 数値 current がlower ~ higher の範囲内か?(Generic版) /// </summary> /// <param name="lower">区間(開始)</param> /// <param name="current">比較される値</param> /// <param name="higher">区間(終了)</param> /// <param name="incl