public void Subtract_ForNumbers_Subtracts() { _subtract.Execute(1, 2) .Returns(-1); CreateSut().Subtract(1, 2) .Should() .Be(-1); }
public void Subtract_ForNumbers_Subtracts(Calculator sut, [Freeze] ISubtract subtract) { subtract?.Execute(1, 2) .Returns(-1); sut.Subtract(1, 2) .Should() .Be(-1); }
public int Subtract(int a, int b) { return(_subtract.Execute(a, b)); }