Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
メソッドへの引数として渡されないメソッド内のクラスのオブジェクトをどのように使用できますか
クラス自体によってインスタンス化されることに依存するのではなく、このオブジェクトを注入する必要があるようです。
依存性注入に関するこの記事と、テストに固有の情報については、この記事を参照してください。