private int Calculate(MathematicModel model) { switch (model.Operation) { case Operations.Add: return(_mathematics.Add(model.First, model.Second)); case Operations.Subtract: return(_mathematics.Subtract(model.First, model.Second)); default: throw new NotSupportedException(); } }
public void Subtract_Test() { Assert.That(_mathematics.Subtract(5, 2) == 3); Assert.That(_mathematics.Subtract(5, 10) == -5); Assert.That(_mathematics.Subtract(5, -2) == 7); }