public void GetAndSetEnumValues() { // TODO: Generator should create a parameterless constructor. Calculator_ calc = new Calculator_(new CalculatorProps()); calc.Add(9); calc.Pow(3); Assert.Equal(CompositionStringStyle.Normal, calc.StringStyle); calc.StringStyle = CompositionStringStyle.Decorated; Assert.Equal(CompositionStringStyle.Decorated, calc.StringStyle); Assert.Equal("<<[[{{(((1 * (0 + 9)) * (0 + 9)) * (0 + 9))}}]]>>", calc.ToString()); }
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); }