Machine.Fakes を 1.0.1 からバージョン 1.7 に更新した後、「WithFakes はまだ初期化されていません。静的初期化子から呼び出していますか?」というメッセージが表示されます。エラー/例外。
私は次のようにテストを構築しています:
[TestFixture]
public class MailSenderTests : WithSubject<MailSender>
{
[TestFixture]
public class TheSendMethod : AssertionHelper
{
[Test]
public void Test_that_exception_is_thrown_if_no_recievers()
{
Expect(() => Subject.Send(string.Empty, string.Empty, recievers: null), Throws.InstanceOf<ArgumentException>());
}
}
}
SUT でテストしている各メソッドのクラスがあります。
誰かが私が間違っていることを教えてもらえますか?