public void Initialize() { encryptedText = MockRepository.GenerateMock<IObservableText>(); textHelper = MockRepository.GenerateMock<ITextHelper>(); xorKeyFinderFactory = MockRepository.GenerateMock<IXORKeyFinderFactory>(); xorKeyFinder = MockRepository.GenerateMock<IXORKeyFinder>(); xorKeyFinderFactory.Stub(x => x.Create(null, null, 0, 0)).IgnoreArguments().Return(xorKeyFinder); target = new XORDecrypter(encryptedText, textHelper, xorKeyFinderFactory); }
private void StubXORKeyFinderFactoryToReturn(IXORKeyFinder xorKeyFinder) { xorKeyFinderFactory.Stub(x => x.Create(null, null, 0, 0)).IgnoreArguments().Return(xorKeyFinder); }