コード例 #1
0
        public void DoubleNegativeWithOtherOperators()
        {
            var result = new GrundrechnerTest().TestSolve("2 - -2 * 2 + 2");

            Assert.True(result == 8);
        }
コード例 #2
0
        public void EquationDecimal()
        {
            var result = new GrundrechnerTest().TestSolve("10,5 + 3,5 + 6");

            Assert.True(result == 20);
        }
コード例 #3
0
        public void DoubleNegative()
        {
            var result = new GrundrechnerTest().TestSolve("2 - -2");

            Assert.True(result == 4);
        }
コード例 #4
0
        public void EquationWithoutDecimalandThreeBracket()
        {
            var result = new GrundrechnerTest().TestSolve("20 - ( 10 + ( 2 * ( 2 + 3 ) ) )");

            Assert.True(result == 0);
        }
コード例 #5
0
        public void EquationDecimalRightlastDecimal()
        {
            var result = new GrundrechnerTest().TestSolve("10,5 + 3,5");

            Assert.True(result == 14);
        }
コード例 #6
0
        public void EquationWithoutDecimalandAndBracketsPunktVorStrich()
        {
            var result = new GrundrechnerTest().TestSolve("20 - 10 * 2");

            Assert.True(result == 0);
        }
コード例 #7
0
        public void EquationWithoutDecimalandOneBracket()
        {
            var result = new GrundrechnerTest().TestSolve("20 - ( 10 + 2 )");

            Assert.True(result == 8);
        }
コード例 #8
0
        public void EquationWithoutDecimalandAndBracketsSubdraction()
        {
            var result = new GrundrechnerTest().TestSolve("20 - 10");

            Assert.True(result == 10);
        }
コード例 #9
0
        public void EquationWithoutDecimalandAndBracketsAllesVermischt()
        {
            var result = new GrundrechnerTest().TestSolve("10 + 10 - 20");

            Assert.True(result == 0);
        }
コード例 #10
0
        public void EquationWithoutDecimalandAndBracketsDivision()
        {
            var result = new GrundrechnerTest().TestSolve("10 / 10");

            Assert.True(result == 1);
        }
コード例 #11
0
        public void EquationWithoutDecimalandAndBracketsMultiplication()
        {
            var result = new GrundrechnerTest().TestSolve("10 * 10");

            Assert.True(result == 100);
        }
コード例 #12
0
        public void sameBracketLevels()
        {
            var result = new GrundrechnerTest().TestSolve("( ( 12 - 6 ) * 2 ) + ( ( 4 - 8 ) - 9 )");

            Assert.True(result == -1);
        }
コード例 #13
0
        public void Multiplicationwithoutasteriks()
        {
            var result = new GrundrechnerTest().TestSolve(" 1 ( 1 - 2 )");

            Assert.True(result == -1);
        }
コード例 #14
0
        public void DevidedByMinus()
        {
            var result = new GrundrechnerTest().TestSolve(" 7 / -2");

            Assert.True(result == -3.5);
        }
コード例 #15
0
        public void EquationNegativeMultiplication()
        {
            var result = new GrundrechnerTest().TestSolve(" 1 * -2 ");

            Assert.True(result == -2);
        }
コード例 #16
0
        public void EquationNegativeDecimal()
        {
            var result = new GrundrechnerTest().TestSolve("-1,5 + 1 - -2 ");

            Assert.True(result == 1.5);
        }