public void Returns_value_from_identifier() { var coinInput = new CoinInput(); var coin = new Coin(); _coinIdentifier.Stub(i => i.Identify(coinInput)).Return(coin); Coin result = _sorter.Sort(coinInput); Assert.That(result, Is.EqualTo(coin)); }
public void Should_return_value_from_successor() { var coinInput = new CoinInput {Mass = 20}; _coinCheck.Stub(cc => cc.CheckCoin(null, null)).IgnoreArguments().Return(false); var successorCoin = new Coin {Value = _value}; _successor.Stub(s => s.Identify(null)).IgnoreArguments().Return(successorCoin); Coin output = _realCoinIdentifier.Identify(coinInput); Assert.That(output, Is.EqualTo(successorCoin)); }