After updating Machine.Fakes to version 1.7 from 1.0.1 I am getting a "WithFakes has not been initialized yet. Are you calling it from a static initializer?" error/exception.
I am structering my tests like this:
[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>());
}
}
}
I have a class for each method I am testing in the SUT.
Can someone tell me what I am doing wrong?