public override void Context() { _substitute = mock<Foo>(); _substituteFactory = mock<ISubstituteFactory>(); _substituteFactory.stub(x => x.Create<Foo>()).Return(_substitute); _context = mock<ISubstitutionContext>(); _context.stub(x => x.GetSubstituteFactory()).Return(_substituteFactory); temporarilyChange(() => SubstitutionContext.Current).to(_context); }
public override void Because() { _result = Substitute.For<Foo>(); }