public void SubClassing() { // TODO: Generator should create a parameterless constructor. Calculator_ calc = new Calculator_(new CalculatorProps()); calc.Curr = new AddTen(33); calc.Neg(); Assert.Equal((double)-43, calc.Value); }
public void GetAndSetNotPrimitiveProperties() { // TODO: Generator should create a parameterless constructor. Calculator_ calc = new Calculator_(new CalculatorProps()); calc.Add(3200000); calc.Neg(); calc.Curr = new Multiply(new Number(2), calc.Curr); Assert.Equal((double)-6400000, calc.Value); }
public void CallMethods() { // TODO: Generator should create a parameterless constructor. Calculator_ calc = new Calculator_(new CalculatorProps()); calc.Add(10); Assert.Equal((double)10, calc.Value); calc.Mul(2); Assert.Equal((double)20, calc.Value); calc.Pow(5); Assert.Equal((double)20 * 20 * 20 * 20 * 20, calc.Value); calc.Neg(); Assert.Equal((double)-3200000, calc.Value); }